s3c44b0.h 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. /*
  2. * File : s3c45b0.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006, RT-Thread Develop Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://openlab.rt-thread.com/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2006-09-06 XuXinming first version
  13. * 2006-09-16 Bernard modify according to code style
  14. */
  15. #ifndef __S3C44B0_H__
  16. #define __S3C44B0_H__
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. /**
  21. * @addtogroup S3C44B0
  22. */
  23. /*@{*/
  24. /*------------------------------------------------------------------------
  25. * ASIC Address Definition
  26. *----------------------------------------------------------------------*/
  27. #define S3C_REG *(volatile unsigned int *)
  28. #define S3C_REGW *(volatile unsigned short *)
  29. #define S3C_REGB *(volatile unsigned char *)
  30. /* System */
  31. #define SYSCFG (S3C_REG(0x1c00000))
  32. /* Cache */
  33. #define NCACHBE0 (S3C_REG(0x1c00004))
  34. #define NCACHBE1 (S3C_REG(0x1c00008))
  35. /* Bus control */
  36. #define SBUSCON (S3C_REG(0x1c40000))
  37. /* Memory control */
  38. #define BWSCON (S3C_REG(0x1c80000))
  39. #define BANKCON0 (S3C_REG(0x1c80004))
  40. #define BANKCON1 (S3C_REG(0x1c80008))
  41. #define BANKCON2 (S3C_REG(0x1c8000c))
  42. #define BANKCON3 (S3C_REG(0x1c80010))
  43. #define BANKCON4 (S3C_REG(0x1c80014))
  44. #define BANKCON5 (S3C_REG(0x1c80018))
  45. #define BANKCON6 (S3C_REG(0x1c8001c))
  46. #define BANKCON7 (S3C_REG(0x1c80020))
  47. #define REFRESH (S3C_REG(0x1c80024))
  48. #define BANKSIZE (S3C_REG(0x1c80028))
  49. #define MRSRB6 (S3C_REG(0x1c8002c))
  50. #define MRSRB7 (S3C_REG(0x1c80030))
  51. /* UART */
  52. #define ULCON0 (S3C_REG(0x1d00000))
  53. #define ULCON1 (S3C_REG(0x1d04000))
  54. #define UCON0 (S3C_REG(0x1d00004))
  55. #define UCON1 (S3C_REG(0x1d04004))
  56. #define UFCON0 (S3C_REG(0x1d00008))
  57. #define UFCON1 (S3C_REG(0x1d04008))
  58. #define UMCON0 (S3C_REG(0x1d0000c))
  59. #define UMCON1 (S3C_REG(0x1d0400c))
  60. #define UTRSTAT0 (S3C_REG(0x1d00010))
  61. #define UTRSTAT1 (S3C_REG(0x1d04010))
  62. #define UERSTAT0 (S3C_REG(0x1d00014))
  63. #define UERSTAT1 (S3C_REG(0x1d04014))
  64. #define UFSTAT0 (S3C_REG(0x1d00018))
  65. #define UFSTAT1 (S3C_REG(0x1d04018))
  66. #define UMSTAT0 (S3C_REG(0x1d0001c))
  67. #define UMSTAT1 (S3C_REG(0x1d0401c))
  68. #define UBRDIV0 (S3C_REG(0x1d00028))
  69. #define UBRDIV1 (S3C_REG(0x1d04028))
  70. #define UTXH0 (S3C_REGB(0x1d00020))
  71. #define UTXH1 (S3C_REGB(0x1d04020))
  72. #define URXH0 (S3C_REGB(0x1d00024))
  73. #define URXH1 (S3C_REGB(0x1d04024))
  74. /* SIO */
  75. #define SIOCON (S3C_REG(0x1d14000))
  76. #define SIODAT (S3C_REG(0x1d14004))
  77. #define SBRDR (S3C_REG(0x1d14008))
  78. #define IVTCNT (S3C_REG(0x1d1400c))
  79. #define DCNTZ (S3C_REG(0x1d14010))
  80. /* IIS */
  81. #define IISCON (S3C_REG(0x1d18000))
  82. #define IISMOD (S3C_REG(0x1d18004))
  83. #define IISPSR (S3C_REG(0x1d18008))
  84. #define IISFCON (S3C_REG(0x1d1800c))
  85. #define IISFIF (S3C_REQW(0x1d18010))
  86. /* I/O Port */
  87. #define PCONA (S3C_REG(0x1d20000))
  88. #define PDATA (S3C_REG(0x1d20004))
  89. #define PCONB (S3C_REG(0x1d20008))
  90. #define PDATB (S3C_REG(0x1d2000c))
  91. #define PCONC (S3C_REG(0x1d20010))
  92. #define PDATC (S3C_REG(0x1d20014))
  93. #define PUPC (S3C_REG(0x1d20018))
  94. #define PCOND (S3C_REG(0x1d2001c))
  95. #define PDATD (S3C_REG(0x1d20020))
  96. #define PUPD (S3C_REG(0x1d20024))
  97. #define PCONE (S3C_REG(0x1d20028))
  98. #define PDATE (S3C_REG(0x1d2002c))
  99. #define PUPE (S3C_REG(0x1d20030))
  100. #define PCONF (S3C_REG(0x1d20034))
  101. #define PDATF (S3C_REG(0x1d20038))
  102. #define PUPF (S3C_REG(0x1d2003c))
  103. #define PCONG (S3C_REG(0x1d20040))
  104. #define PDATG (S3C_REG(0x1d20044))
  105. #define PUPG (S3C_REG(0x1d20048))
  106. #define SPUCR (S3C_REG(0x1d2004c))
  107. #define EXTINT (S3C_REG(0x1d20050))
  108. #define EXTINTPND (S3C_REG(0x1d20054))
  109. /* Watchdog */
  110. #define WTCON (S3C_REG(0x1d30000))
  111. #define WTDAT (S3C_REG(0x1d30004))
  112. #define WTCNT (S3C_REG(0x1d30008))
  113. /* ADC */
  114. #define ADCCON (S3C_REG(0x1d40000))
  115. #define ADCPSR (S3C_REG(0x1d40004))
  116. #define ADCDAT (S3C_REG(0x1d40008))
  117. /* Timer */
  118. #define TCFG0 (S3C_REG(0x1d50000))
  119. #define TCFG1 (S3C_REG(0x1d50004))
  120. #define TCON (S3C_REG(0x1d50008))
  121. #define TCNTB0 (S3C_REG(0x1d5000c))
  122. #define TCMPB0 (S3C_REG(0x1d50010))
  123. #define TCNTO0 (S3C_REG(0x1d50014))
  124. #define TCNTB1 (S3C_REG(0x1d50018))
  125. #define TCMPB1 (S3C_REG(0x1d5001c))
  126. #define TCNTO1 (S3C_REG(0x1d50020))
  127. #define TCNTB2 (S3C_REG(0x1d50024))
  128. #define TCMPB2 (S3C_REG(0x1d50028))
  129. #define TCNTO2 (S3C_REG(0x1d5002c))
  130. #define TCNTB3 (S3C_REG(0x1d50030))
  131. #define TCMPB3 (S3C_REG(0x1d50034))
  132. #define TCNTO3 (S3C_REG(0x1d50038))
  133. #define TCNTB4 (S3C_REG(0x1d5003c))
  134. #define TCMPB4 (S3C_REG(0x1d50040))
  135. #define TCNTO4 (S3C_REG(0x1d50044))
  136. #define TCNTB5 (S3C_REG(0x1d50048))
  137. #define TCNTO5 (S3C_REG(0x1d5004c))
  138. /* IIC */
  139. #define IICCON (S3C_REG(0x1d60000))
  140. #define IICSTAT (S3C_REG(0x1d60004))
  141. #define IICADD (S3C_REG(0x1d60008))
  142. #define IICDS (S3C_REG(0x1d6000c))
  143. /* RTC */
  144. #define RTCCON (S3C_REGB(0x1d70040)
  145. #define RTCALM (S3C_REGB(0x1d70050)
  146. #define ALMSEC (S3C_REGB(0x1d70054)
  147. #define ALMMIN (S3C_REGB(0x1d70058)
  148. #define ALMHOUR (S3C_REGB(0x1d7005c)
  149. #define ALMDAY (S3C_REGB(0x1d70060)
  150. #define ALMMON (S3C_REGB(0x1d70064)
  151. #define ALMYEAR (S3C_REGB(0x1d70068)
  152. #define RTCRST (S3C_REGB(0x1d7006c)
  153. #define BCDSEC (S3C_REGB(0x1d70070)
  154. #define BCDMIN (S3C_REGB(0x1d70074)
  155. #define BCDHOUR (S3C_REGB(0x1d70078)
  156. #define BCDDAY (S3C_REGB(0x1d7007c)
  157. #define BCDDATE (S3C_REGB(0x1d70080)
  158. #define BCDMON (S3C_REGB(0x1d70084)
  159. #define BCDYEAR (S3C_REGB(0x1d70088)
  160. #define TICINT (S3C_REGB(0x1d7008c)
  161. /* Clock & Power management */
  162. #define PLLCON (S3C_REG(0x1d80000))
  163. #define CLKCON (S3C_REG(0x1d80004))
  164. #define CLKSLOW (S3C_REG(0x1d80008))
  165. #define LOCKTIME (S3C_REG(0x1d8000c))
  166. /* Interrupt */
  167. #define INTCON (S3C_REG(0x1e00000))
  168. #define INTPND (S3C_REG(0x1e00004))
  169. #define INTMOD (S3C_REG(0x1e00008))
  170. #define INTMSK (S3C_REG(0x1e0000c))
  171. #define I_PSLV (S3C_REG(0x1e00010))
  172. #define I_PMST (S3C_REG(0x1e00014))
  173. #define I_CSLV (S3C_REG(0x1e00018))
  174. #define I_CMST (S3C_REG(0x1e0001c))
  175. #define I_ISPR (S3C_REG(0x1e00020))
  176. #define I_ISPC (S3C_REG(0x1e00024))
  177. #define F_ISPR (S3C_REG(0x1e00038))
  178. #define F_ISPC (S3C_REG(0x1e0003c))
  179. /********************************/
  180. /* LCD Controller Registers */
  181. /********************************/
  182. #define LCDCON1 (S3C_REG(0x300000))
  183. #define LCDCON2 (S3C_REG(0x300004))
  184. #define LCDSADDR1 (S3C_REG(0x300008))
  185. #define LCDSADDR2 (S3C_REG(0x30000c))
  186. #define LCDSADDR3 (S3C_REG(0x300010))
  187. #define REDLUT (S3C_REG(0x300014))
  188. #define GREENLUT (S3C_REG(0x300018))
  189. #define BLUELUT (S3C_REG(0x30001c))
  190. #define DP1_2 (S3C_REG(0x300020))
  191. #define DP4_7 (S3C_REG(0x300024))
  192. #define DP3_5 (S3C_REG(0x300028))
  193. #define DP2_3 (S3C_REG(0x30002c))
  194. #define DP5_7 (S3C_REG(0x300030))
  195. #define DP3_4 (S3C_REG(0x300034))
  196. #define DP4_5 (S3C_REG(0x300038))
  197. #define DP6_7 (S3C_REG(0x30003c))
  198. #define LCDCON3 (S3C_REG(0x300040))
  199. #define DITHMODE (S3C_REG(0x300044))
  200. /* ZDMA0 */
  201. #define ZDCON0 (S3C_REG(0x1e80000))
  202. #define ZDISRC0 (S3C_REG(0x1e80004))
  203. #define ZDIDES0 (S3C_REG(0x1e80008))
  204. #define ZDICNT0 (S3C_REG(0x1e8000c))
  205. #define ZDCSRC0 (S3C_REG(0x1e80010))
  206. #define ZDCDES0 (S3C_REG(0x1e80014))
  207. #define ZDCCNT0 (S3C_REG(0x1e80018))
  208. /* ZDMA1 */
  209. #define ZDCON1 (S3C_REG(0x1e80020))
  210. #define ZDISRC1 (S3C_REG(0x1e80024))
  211. #define ZDIDES1 (S3C_REG(0x1e80028))
  212. #define ZDICNT1 (S3C_REG(0x1e8002c))
  213. #define ZDCSRC1 (S3C_REG(0x1e80030))
  214. #define ZDCDES1 (S3C_REG(0x1e80034))
  215. #define ZDCCNT1 (S3C_REG(0x1e80038))
  216. /* BDMA0 */
  217. #define BDCON0 (S3C_REG(0x1f80000))
  218. #define BDISRC0 (S3C_REG(0x1f80004))
  219. #define BDIDES0 (S3C_REG(0x1f80008))
  220. #define BDICNT0 (S3C_REG(0x1f8000c))
  221. #define BDCSRC0 (S3C_REG(0x1f80010))
  222. #define BDCDES0 (S3C_REG(0x1f80014))
  223. #define BDCCNT0 (S3C_REG(0x1f80018))
  224. /* BDMA1 */
  225. #define BDCON1 (S3C_REG(0x1f80020))
  226. #define BDISRC1 (S3C_REG(0x1f80024))
  227. #define BDIDES1 (S3C_REG(0x1f80028))
  228. #define BDICNT1 (S3C_REG(0x1f8002c))
  229. #define BDCSRC1 (S3C_REG(0x1f80030))
  230. #define BDCDES1 (S3C_REG(0x1f80034))
  231. #define BDCCNT1 (S3C_REG(0x1f80038))
  232. /*****************************/
  233. /* CPU Mode */
  234. /*****************************/
  235. #define USERMODE 0x10 /* User Mode(USR) */
  236. #define FIQMODE 0x11 /* Fast Interrupt Mode (FIQ) */
  237. #define IRQMODE 0x12 /* Interrupt Mode (IRQ) */
  238. #define SVCMODE 0x13 /* Supervisor Mode (SVC) */
  239. #define ABORTMODE 0x17 /* Abort Mode(ABT) */
  240. #define UNDEFMODE 0x1b /* Undefine Mode(UDF) */
  241. #define MODEMASK 0x1f /* Processor Mode Mask */
  242. #define NOINT 0xc0
  243. /*****************************/
  244. /* INT Define */
  245. /*****************************/
  246. #define INT_ADC 0x00
  247. #define INT_RTC 0x01
  248. #define INT_UTXD1 0x02
  249. #define INT_UTXD0 0x03
  250. #define INT_SIO 0x04
  251. #define INT_IIC 0x05
  252. #define INT_URXD1 0x06
  253. #define INT_URXD0 0x07
  254. #define INT_TIMER5 0x08
  255. #define INT_TIMER4 0x09
  256. #define INT_TIMER3 0x0A
  257. #define INT_TIMER2 0x0B
  258. #define INT_TIMER1 0x0C
  259. #define INT_TIMER0 0x0D
  260. #define INT_UERR01 0x0E
  261. #define INT_WDT 0x1F
  262. #define INT_BDMA1 0x10
  263. #define INT_BDMA0 0x11
  264. #define INT_ZDMA1 0x12
  265. #define INT_ZDMA0 0x13
  266. #define INT_TICK 0x14
  267. #define INT_EINT4567 0x15
  268. #define INT_EINT3 0x16
  269. #define INT_EINT2 0x17
  270. #define INT_EINT1 0x18
  271. #define INT_EINT0 0x19
  272. #define INT_GLOBAL 26
  273. struct rt_hw_register
  274. {
  275. unsigned long r0;
  276. unsigned long r1;
  277. unsigned long r2;
  278. unsigned long r3;
  279. unsigned long r4;
  280. unsigned long r5;
  281. unsigned long r6;
  282. unsigned long r7;
  283. unsigned long r8;
  284. unsigned long r9;
  285. unsigned long r10;
  286. unsigned long fp;
  287. unsigned long ip;
  288. unsigned long sp;
  289. unsigned long lr;
  290. unsigned long pc;
  291. unsigned long cpsr;
  292. unsigned long ORIG_r0;
  293. };
  294. /*@}*/
  295. #ifdef __cplusplus
  296. }
  297. #endif
  298. #endif