s3c2400.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429
  1. /************************************************
  2. * NAME : s3c2400.h
  3. * Version : 3.7.2002
  4. *
  5. * Based on 24x.h for the Samsung Development Board
  6. ************************************************/
  7. #ifndef __S3C2400_H__
  8. #define __S3C2400_H__
  9. /* Memory control */
  10. #define rBWSCON (*(volatile unsigned *)0x14000000)
  11. #define rBANKCON0 (*(volatile unsigned *)0x14000004)
  12. #define rBANKCON1 (*(volatile unsigned *)0x14000008)
  13. #define rBANKCON2 (*(volatile unsigned *)0x1400000C)
  14. #define rBANKCON3 (*(volatile unsigned *)0x14000010)
  15. #define rBANKCON4 (*(volatile unsigned *)0x14000014)
  16. #define rBANKCON5 (*(volatile unsigned *)0x14000018)
  17. #define rBANKCON6 (*(volatile unsigned *)0x1400001C)
  18. #define rBANKCON7 (*(volatile unsigned *)0x14000020)
  19. #define rREFRESH (*(volatile unsigned *)0x14000024)
  20. #define rBANKSIZE (*(volatile unsigned *)0x14000028)
  21. #define rMRSRB6 (*(volatile unsigned *)0x1400002C)
  22. #define rMRSRB7 (*(volatile unsigned *)0x14000030)
  23. /* INTERRUPT */
  24. #define rSRCPND (*(volatile unsigned *)0x14400000)
  25. #define rINTMOD (*(volatile unsigned *)0x14400004)
  26. #define rINTMSK (*(volatile unsigned *)0x14400008)
  27. #define rPRIORITY (*(volatile unsigned *)0x1440000C)
  28. #define rINTPND (*(volatile unsigned *)0x14400010)
  29. #define rINTOFFSET (*(volatile unsigned *)0x14400014)
  30. /* DMA */
  31. #define rDISRC0 (*(volatile unsigned *)0x14600000)
  32. #define rDIDST0 (*(volatile unsigned *)0x14600004)
  33. #define rDCON0 (*(volatile unsigned *)0x14600008)
  34. #define rDSTAT0 (*(volatile unsigned *)0x1460000C)
  35. #define rDCSRC0 (*(volatile unsigned *)0x14600010)
  36. #define rDCDST0 (*(volatile unsigned *)0x14600014)
  37. #define rDMASKTRIG0 (*(volatile unsigned *)0x14600018)
  38. #define rDISRC1 (*(volatile unsigned *)0x14600020)
  39. #define rDIDST1 (*(volatile unsigned *)0x14600024)
  40. #define rDCON1 (*(volatile unsigned *)0x14600028)
  41. #define rDSTAT1 (*(volatile unsigned *)0x1460002C)
  42. #define rDCSRC1 (*(volatile unsigned *)0x14600030)
  43. #define rDCDST1 (*(volatile unsigned *)0x14600034)
  44. #define rDMASKTRIG1 (*(volatile unsigned *)0x14600038)
  45. #define rDISRC2 (*(volatile unsigned *)0x14600040)
  46. #define rDIDST2 (*(volatile unsigned *)0x14600044)
  47. #define rDCON2 (*(volatile unsigned *)0x14600048)
  48. #define rDSTAT2 (*(volatile unsigned *)0x1460004C)
  49. #define rDCSRC2 (*(volatile unsigned *)0x14600050)
  50. #define rDCDST2 (*(volatile unsigned *)0x14600054)
  51. #define rDMASKTRIG2 (*(volatile unsigned *)0x14600058)
  52. #define rDISRC3 (*(volatile unsigned *)0x14600060)
  53. #define rDIDST3 (*(volatile unsigned *)0x14600064)
  54. #define rDCON3 (*(volatile unsigned *)0x14600068)
  55. #define rDSTAT3 (*(volatile unsigned *)0x1460006C)
  56. #define rDCSRC3 (*(volatile unsigned *)0x14600070)
  57. #define rDCDST3 (*(volatile unsigned *)0x14600074)
  58. #define rDMASKTRIG3 (*(volatile unsigned *)0x14600078)
  59. /* CLOCK & POWER MANAGEMENT */
  60. #define rLOCKTIME (*(volatile unsigned *)0x14800000)
  61. #define rMPLLCON (*(volatile unsigned *)0x14800004)
  62. #define rUPLLCON (*(volatile unsigned *)0x14800008)
  63. #define rCLKCON (*(volatile unsigned *)0x1480000C)
  64. #define rCLKSLOW (*(volatile unsigned *)0x14800010)
  65. #define rCLKDIVN (*(volatile unsigned *)0x14800014)
  66. /* LCD CONTROLLER */
  67. #define rLCDCON1 (*(volatile unsigned *)0x14A00000)
  68. #define rLCDCON2 (*(volatile unsigned *)0x14A00004)
  69. #define rLCDCON3 (*(volatile unsigned *)0x14A00008)
  70. #define rLCDCON4 (*(volatile unsigned *)0x14A0000C)
  71. #define rLCDCON5 (*(volatile unsigned *)0x14A00010)
  72. #define rLCDSADDR1 (*(volatile unsigned *)0x14A00014)
  73. #define rLCDSADDR2 (*(volatile unsigned *)0x14A00018)
  74. #define rLCDSADDR3 (*(volatile unsigned *)0x14A0001C)
  75. #define rREDLUT (*(volatile unsigned *)0x14A00020)
  76. #define rGREENLUT (*(volatile unsigned *)0x14A00024)
  77. #define rBLUELUT (*(volatile unsigned *)0x14A00028)
  78. #define rDP1_2 (*(volatile unsigned *)0x14A0002C)
  79. #define rDP4_7 (*(volatile unsigned *)0x14A00030)
  80. #define rDP3_5 (*(volatile unsigned *)0x14A00034)
  81. #define rDP2_3 (*(volatile unsigned *)0x14A00038)
  82. #define rDP5_7 (*(volatile unsigned *)0x14A0003c)
  83. #define rDP3_4 (*(volatile unsigned *)0x14A00040)
  84. #define rDP4_5 (*(volatile unsigned *)0x14A00044)
  85. #define rDP6_7 (*(volatile unsigned *)0x14A00048)
  86. #define rDITHMODE (*(volatile unsigned *)0x14A0004C)
  87. #define rTPAL (*(volatile unsigned *)0x14A00050)
  88. #define PALETTE (0x14A00400) /* SJS */
  89. /* UART */
  90. #define rULCON0 (*(volatile unsigned char *)0x15000000)
  91. #define rUCON0 (*(volatile unsigned short *)0x15000004)
  92. #define rUFCON0 (*(volatile unsigned char *)0x15000008)
  93. #define rUMCON0 (*(volatile unsigned char *)0x1500000C)
  94. #define rUTRSTAT0 (*(volatile unsigned char *)0x15000010)
  95. #define rUERSTAT0 (*(volatile unsigned char *)0x15000014)
  96. #define rUFSTAT0 (*(volatile unsigned short *)0x15000018)
  97. #define rUMSTAT0 (*(volatile unsigned char *)0x1500001C)
  98. #define rUBRDIV0 (*(volatile unsigned short *)0x15000028)
  99. #define rULCON1 (*(volatile unsigned char *)0x15004000)
  100. #define rUCON1 (*(volatile unsigned short *)0x15004004)
  101. #define rUFCON1 (*(volatile unsigned char *)0x15004008)
  102. #define rUMCON1 (*(volatile unsigned char *)0x1500400C)
  103. #define rUTRSTAT1 (*(volatile unsigned char *)0x15004010)
  104. #define rUERSTAT1 (*(volatile unsigned char *)0x15004014)
  105. #define rUFSTAT1 (*(volatile unsigned short *)0x15004018)
  106. #define rUMSTAT1 (*(volatile unsigned char *)0x1500401C)
  107. #define rUBRDIV1 (*(volatile unsigned short *)0x15004028)
  108. #ifdef __BIG_ENDIAN
  109. #define rUTXH0 (*(volatile unsigned char *)0x15000023)
  110. #define rURXH0 (*(volatile unsigned char *)0x15000027)
  111. #define rUTXH1 (*(volatile unsigned char *)0x15004023)
  112. #define rURXH1 (*(volatile unsigned char *)0x15004027)
  113. #define WrUTXH0(ch) (*(volatile unsigned char *)0x15000023)=(unsigned char)(ch)
  114. #define RdURXH0() (*(volatile unsigned char *)0x15000027)
  115. #define WrUTXH1(ch) (*(volatile unsigned char *)0x15004023)=(unsigned char)(ch)
  116. #define RdURXH1() (*(volatile unsigned char *)0x15004027)
  117. #define UTXH0 (0x15000020+3) /* byte_access address by DMA */
  118. #define URXH0 (0x15000024+3)
  119. #define UTXH1 (0x15004020+3)
  120. #define URXH1 (0x15004024+3)
  121. #else /* Little Endian */
  122. #define rUTXH0 (*(volatile unsigned char *)0x15000020)
  123. #define rURXH0 (*(volatile unsigned char *)0x15000024)
  124. #define rUTXH1 (*(volatile unsigned char *)0x15004020)
  125. #define rURXH1 (*(volatile unsigned char *)0x15004024)
  126. #define WrUTXH0(ch) (*(volatile unsigned char *)0x15000020)=(unsigned char)(ch)
  127. #define RdURXH0() (*(volatile unsigned char *)0x15000024)
  128. #define WrUTXH1(ch) (*(volatile unsigned char *)0x15004020)=(unsigned char)(ch)
  129. #define RdURXH1() (*(volatile unsigned char *)0x15004024)
  130. #define UTXH0 (0x15000020) /* byte_access address by DMA */
  131. #define URXH0 (0x15000024)
  132. #define UTXH1 (0x15004020)
  133. #define URXH1 (0x15004024)
  134. #endif
  135. /* PWM TIMER */
  136. #define rTCFG0 (*(volatile unsigned *)0x15100000)
  137. #define rTCFG1 (*(volatile unsigned *)0x15100004)
  138. #define rTCON (*(volatile unsigned *)0x15100008)
  139. #define rTCNTB0 (*(volatile unsigned *)0x1510000C)
  140. #define rTCMPB0 (*(volatile unsigned *)0x15100010)
  141. #define rTCNTO0 (*(volatile unsigned *)0x15100014)
  142. #define rTCNTB1 (*(volatile unsigned *)0x15100018)
  143. #define rTCMPB1 (*(volatile unsigned *)0x1510001C)
  144. #define rTCNTO1 (*(volatile unsigned *)0x15100020)
  145. #define rTCNTB2 (*(volatile unsigned *)0x15100024)
  146. #define rTCMPB2 (*(volatile unsigned *)0x15100028)
  147. #define rTCNTO2 (*(volatile unsigned *)0x1510002C)
  148. #define rTCNTB3 (*(volatile unsigned *)0x15100030)
  149. #define rTCMPB3 (*(volatile unsigned *)0x15100034)
  150. #define rTCNTO3 (*(volatile unsigned *)0x15100038)
  151. #define rTCNTB4 (*(volatile unsigned *)0x1510003C)
  152. #define rTCNTO4 (*(volatile unsigned *)0x15100040)
  153. /* USB DEVICE */
  154. #define rFUNC_ADDR_REG (*(volatile unsigned *)0x15200140)
  155. #define rPWR_REG (*(volatile unsigned *)0x15200144)
  156. #define rINT_REG (*(volatile unsigned *)0x15200148)
  157. #define rINT_MASK_REG (*(volatile unsigned *)0x1520014C)
  158. #define rFRAME_NUM_REG (*(volatile unsigned *)0x15200150)
  159. #define rRESUME_CON_REG (*(volatile unsigned *)0x15200154)
  160. #define rEP0_CSR (*(volatile unsigned *)0x15200160)
  161. #define rEP0_MAXP (*(volatile unsigned *)0x15200164)
  162. #define rEP0_OUT_CNT (*(volatile unsigned *)0x15200168)
  163. #define rEP0_FIFO (*(volatile unsigned *)0x1520016C)
  164. #define rEP1_IN_CSR (*(volatile unsigned *)0x15200180)
  165. #define rEP1_IN_MAXP (*(volatile unsigned *)0x15200184)
  166. #define rEP1_FIFO (*(volatile unsigned *)0x15200188)
  167. #define rEP2_IN_CSR (*(volatile unsigned *)0x15200190)
  168. #define rEP2_IN_MAXP (*(volatile unsigned *)0x15200194)
  169. #define rEP2_FIFO (*(volatile unsigned *)0x15200198)
  170. #define rEP3_OUT_CSR (*(volatile unsigned *)0x152001A0)
  171. #define rEP3_OUT_MAXP (*(volatile unsigned *)0x152001A4)
  172. #define rEP3_OUT_CNT (*(volatile unsigned *)0x152001A8)
  173. #define rEP3_FIFO (*(volatile unsigned *)0x152001AC)
  174. #define rEP4_OUT_CSR (*(volatile unsigned *)0x152001B0)
  175. #define rEP4_OUT_MAXP (*(volatile unsigned *)0x152001B4)
  176. #define rEP4_OUT_CNT (*(volatile unsigned *)0x152001B8)
  177. #define rEP4_FIFO (*(volatile unsigned *)0x152001BC)
  178. #define rDMA_CON (*(volatile unsigned *)0x152001C0)
  179. #define rDMA_UNIT (*(volatile unsigned *)0x152001C4)
  180. #define rDMA_FIFO (*(volatile unsigned *)0x152001C8)
  181. #define rDMA_TX (*(volatile unsigned *)0x152001CC)
  182. #define rTEST_MODE (*(volatile unsigned *)0x152001F4)
  183. #define rIN_CON_REG (*(volatile unsigned *)0x152001F8)
  184. /* WATCH DOG TIMER */
  185. #define rWTCON (*(volatile unsigned *)0x15300000)
  186. #define rWTDAT (*(volatile unsigned *)0x15300004)
  187. #define rWTCNT (*(volatile unsigned *)0x15300008)
  188. /* IIC */
  189. #define rIICCON (*(volatile unsigned *)0x15400000)
  190. #define rIICSTAT (*(volatile unsigned *)0x15400004)
  191. #define rIICADD (*(volatile unsigned *)0x15400008)
  192. #define rIICDS (*(volatile unsigned *)0x1540000C)
  193. /* IIS */
  194. #define rIISCON (*(volatile unsigned *)0x15508000)
  195. #define rIISMOD (*(volatile unsigned *)0x15508004)
  196. #define rIISPSR (*(volatile unsigned *)0x15508008)
  197. #define rIISFIFCON (*(volatile unsigned *)0x1550800C)
  198. #ifdef __BIG_ENDIAN
  199. #define IISFIF ((volatile unsigned short *)0x15508012)
  200. #else /* Little Endian */
  201. #define IISFIF ((volatile unsigned short *)0x15508010)
  202. #endif
  203. /* I/O PORT */
  204. #define rPACON (*(volatile unsigned *)0x15600000)
  205. #define rPADAT (*(volatile unsigned *)0x15600004)
  206. #define rPBCON (*(volatile unsigned *)0x15600008)
  207. #define rPBDAT (*(volatile unsigned *)0x1560000C)
  208. #define rPBUP (*(volatile unsigned *)0x15600010)
  209. #define rPCCON (*(volatile unsigned *)0x15600014)
  210. #define rPCDAT (*(volatile unsigned *)0x15600018)
  211. #define rPCUP (*(volatile unsigned *)0x1560001C)
  212. #define rPDCON (*(volatile unsigned *)0x15600020)
  213. #define rPDDAT (*(volatile unsigned *)0x15600024)
  214. #define rPDUP (*(volatile unsigned *)0x15600028)
  215. #define rPECON (*(volatile unsigned *)0x1560002C)
  216. #define rPEDAT (*(volatile unsigned *)0x15600030)
  217. #define rPEUP (*(volatile unsigned *)0x15600034)
  218. #define rPFCON (*(volatile unsigned *)0x15600038)
  219. #define rPFDAT (*(volatile unsigned *)0x1560003C)
  220. #define rPFUP (*(volatile unsigned *)0x15600040)
  221. #define rPGCON (*(volatile unsigned *)0x15600044)
  222. #define rPGDAT (*(volatile unsigned *)0x15600048)
  223. #define rPGUP (*(volatile unsigned *)0x1560004C)
  224. #define rOPENCR (*(volatile unsigned *)0x15600050)
  225. #define rMISCCR (*(volatile unsigned *)0x15600054)
  226. #define rEXTINT (*(volatile unsigned *)0x15600058)
  227. /* RTC */
  228. #ifdef __BIG_ENDIAN
  229. #define rRTCCON (*(volatile unsigned char *)0x15700043)
  230. #define rRTCALM (*(volatile unsigned char *)0x15700053)
  231. #define rALMSEC (*(volatile unsigned char *)0x15700057)
  232. #define rALMMIN (*(volatile unsigned char *)0x1570005B)
  233. #define rALMHOUR (*(volatile unsigned char *)0x1570005F)
  234. #define rALMDAY (*(volatile unsigned char *)0x15700063)
  235. #define rALMMON (*(volatile unsigned char *)0x15700067)
  236. #define rALMYEAR (*(volatile unsigned char *)0x1570006B)
  237. #define rRTCRST (*(volatile unsigned char *)0x1570006F)
  238. #define rBCDSEC (*(volatile unsigned char *)0x15700073)
  239. #define rBCDMIN (*(volatile unsigned char *)0x15700077)
  240. #define rBCDHOUR (*(volatile unsigned char *)0x1570007B)
  241. #define rBCDDAY (*(volatile unsigned char *)0x1570007F)
  242. #define rBCDDATE (*(volatile unsigned char *)0x15700083)
  243. #define rBCDMON (*(volatile unsigned char *)0x15700087)
  244. #define rBCDYEAR (*(volatile unsigned char *)0x1570008B)
  245. #define rTICINT (*(volatile unsigned char *)0x15700047)
  246. #else /* Little Endian */
  247. #define rRTCCON (*(volatile unsigned char *)0x15700040)
  248. #define rRTCALM (*(volatile unsigned char *)0x15700050)
  249. #define rALMSEC (*(volatile unsigned char *)0x15700054)
  250. #define rALMMIN (*(volatile unsigned char *)0x15700058)
  251. #define rALMHOUR (*(volatile unsigned char *)0x1570005C)
  252. #define rALMDAY (*(volatile unsigned char *)0x15700060)
  253. #define rALMMON (*(volatile unsigned char *)0x15700064)
  254. #define rALMYEAR (*(volatile unsigned char *)0x15700068)
  255. #define rRTCRST (*(volatile unsigned char *)0x1570006C)
  256. #define rBCDSEC (*(volatile unsigned char *)0x15700070)
  257. #define rBCDMIN (*(volatile unsigned char *)0x15700074)
  258. #define rBCDHOUR (*(volatile unsigned char *)0x15700078)
  259. #define rBCDDAY (*(volatile unsigned char *)0x1570007C)
  260. #define rBCDDATE (*(volatile unsigned char *)0x15700080)
  261. #define rBCDMON (*(volatile unsigned char *)0x15700084)
  262. #define rBCDYEAR (*(volatile unsigned char *)0x15700088)
  263. #define rTICINT (*(volatile unsigned char *)0x15700044)
  264. #endif
  265. /* ADC */
  266. #define rADCCON (*(volatile unsigned *)0x15800000)
  267. #define rADCDAT (*(volatile unsigned *)0x15800004)
  268. /* SPI */
  269. #define rSPCON (*(volatile unsigned *)0x15900000)
  270. #define rSPSTA (*(volatile unsigned *)0x15900004)
  271. #define rSPPIN (*(volatile unsigned *)0x15900008)
  272. #define rSPPRE (*(volatile unsigned *)0x1590000C)
  273. #define rSPTDAT (*(volatile unsigned *)0x15900010)
  274. #define rSPRDAT (*(volatile unsigned *)0x15900014)
  275. /* MMC INTERFACE */
  276. #define rMMCON (*(volatile unsigned *)0x15a00000)
  277. #define rMMCRR (*(volatile unsigned *)0x15a00004)
  278. #define rMMFCON (*(volatile unsigned *)0x15a00008)
  279. #define rMMSTA (*(volatile unsigned *)0x15a0000C)
  280. #define rMMFSTA (*(volatile unsigned *)0x15a00010)
  281. #define rMMPRE (*(volatile unsigned *)0x15a00014)
  282. #define rMMLEN (*(volatile unsigned *)0x15a00018)
  283. #define rMMCR7 (*(volatile unsigned *)0x15a0001C)
  284. #define rMMRSP0 (*(volatile unsigned *)0x15a00020)
  285. #define rMMRSP1 (*(volatile unsigned *)0x15a00024)
  286. #define rMMRSP2 (*(volatile unsigned *)0x15a00028)
  287. #define rMMRSP3 (*(volatile unsigned *)0x15a0002C)
  288. #define rMMCMD0 (*(volatile unsigned *)0x15a00030)
  289. #define rMMCMD1 (*(volatile unsigned *)0x15a00034)
  290. #define rMMCR16 (*(volatile unsigned *)0x15a00038)
  291. #define rMMDAT (*(volatile unsigned *)0x15a0003C)
  292. /* ISR */
  293. #define pISR_RESET (*(unsigned *)(_ISR_STARTADDRESS+0x0))
  294. #define pISR_UNDEF (*(unsigned *)(_ISR_STARTADDRESS+0x4))
  295. #define pISR_SWI (*(unsigned *)(_ISR_STARTADDRESS+0x8))
  296. #define pISR_PABORT (*(unsigned *)(_ISR_STARTADDRESS+0xC))
  297. #define pISR_DABORT (*(unsigned *)(_ISR_STARTADDRESS+0x10))
  298. #define pISR_RESERVED (*(unsigned *)(_ISR_STARTADDRESS+0x14))
  299. #define pISR_IRQ (*(unsigned *)(_ISR_STARTADDRESS+0x18))
  300. #define pISR_FIQ (*(unsigned *)(_ISR_STARTADDRESS+0x1C))
  301. #define pISR_EINT0 (*(unsigned *)(_ISR_STARTADDRESS+0x20))
  302. #define pISR_EINT1 (*(unsigned *)(_ISR_STARTADDRESS+0x24))
  303. #define pISR_EINT2 (*(unsigned *)(_ISR_STARTADDRESS+0x28))
  304. #define pISR_EINT3 (*(unsigned *)(_ISR_STARTADDRESS+0x2C))
  305. #define pISR_EINT4 (*(unsigned *)(_ISR_STARTADDRESS+0x30))
  306. #define pISR_EINT5 (*(unsigned *)(_ISR_STARTADDRESS+0x34))
  307. #define pISR_EINT6 (*(unsigned *)(_ISR_STARTADDRESS+0x38))
  308. #define pISR_EINT7 (*(unsigned *)(_ISR_STARTADDRESS+0x3C))
  309. #define pISR_TICK (*(unsigned *)(_ISR_STARTADDRESS+0x40))
  310. #define pISR_WDT (*(unsigned *)(_ISR_STARTADDRESS+0x44))
  311. #define pISR_TIMER0 (*(unsigned *)(_ISR_STARTADDRESS+0x48))
  312. #define pISR_TIMER1 (*(unsigned *)(_ISR_STARTADDRESS+0x4C))
  313. #define pISR_TIMER2 (*(unsigned *)(_ISR_STARTADDRESS+0x50))
  314. #define pISR_TIMER3 (*(unsigned *)(_ISR_STARTADDRESS+0x54))
  315. #define pISR_TIMER4 (*(unsigned *)(_ISR_STARTADDRESS+0x58))
  316. #define pISR_UERR01 (*(unsigned *)(_ISR_STARTADDRESS+0x5C))
  317. #define pISR_NOTUSED (*(unsigned *)(_ISR_STARTADDRESS+0x60))
  318. #define pISR_DMA0 (*(unsigned *)(_ISR_STARTADDRESS+0x64))
  319. #define pISR_DMA1 (*(unsigned *)(_ISR_STARTADDRESS+0x68))
  320. #define pISR_DMA2 (*(unsigned *)(_ISR_STARTADDRESS+0x6C))
  321. #define pISR_DMA3 (*(unsigned *)(_ISR_STARTADDRESS+0x70))
  322. #define pISR_MMC (*(unsigned *)(_ISR_STARTADDRESS+0x74))
  323. #define pISR_SPI (*(unsigned *)(_ISR_STARTADDRESS+0x78))
  324. #define pISR_URXD0 (*(unsigned *)(_ISR_STARTADDRESS+0x7C))
  325. #define pISR_URXD1 (*(unsigned *)(_ISR_STARTADDRESS+0x80))
  326. #define pISR_USBD (*(unsigned *)(_ISR_STARTADDRESS+0x84))
  327. #define pISR_USBH (*(unsigned *)(_ISR_STARTADDRESS+0x88))
  328. #define pISR_IIC (*(unsigned *)(_ISR_STARTADDRESS+0x8C))
  329. #define pISR_UTXD0 (*(unsigned *)(_ISR_STARTADDRESS+0x90))
  330. #define pISR_UTXD1 (*(unsigned *)(_ISR_STARTADDRESS+0x94))
  331. #define pISR_RTC (*(unsigned *)(_ISR_STARTADDRESS+0x98))
  332. #define pISR_ADC (*(unsigned *)(_ISR_STARTADDRESS+0xA0))
  333. /* PENDING BIT */
  334. #define BIT_EINT0 (0x1)
  335. #define BIT_EINT1 (0x1<<1)
  336. #define BIT_EINT2 (0x1<<2)
  337. #define BIT_EINT3 (0x1<<3)
  338. #define BIT_EINT4 (0x1<<4)
  339. #define BIT_EINT5 (0x1<<5)
  340. #define BIT_EINT6 (0x1<<6)
  341. #define BIT_EINT7 (0x1<<7)
  342. #define BIT_TICK (0x1<<8)
  343. #define BIT_WDT (0x1<<9)
  344. #define BIT_TIMER0 (0x1<<10)
  345. #define BIT_TIMER1 (0x1<<11)
  346. #define BIT_TIMER2 (0x1<<12)
  347. #define BIT_TIMER3 (0x1<<13)
  348. #define BIT_TIMER4 (0x1<<14)
  349. #define BIT_UERR01 (0x1<<15)
  350. #define BIT_NOTUSED (0x1<<16)
  351. #define BIT_DMA0 (0x1<<17)
  352. #define BIT_DMA1 (0x1<<18)
  353. #define BIT_DMA2 (0x1<<19)
  354. #define BIT_DMA3 (0x1<<20)
  355. #define BIT_MMC (0x1<<21)
  356. #define BIT_SPI (0x1<<22)
  357. #define BIT_URXD0 (0x1<<23)
  358. #define BIT_URXD1 (0x1<<24)
  359. #define BIT_USBD (0x1<<25)
  360. #define BIT_USBH (0x1<<26)
  361. #define BIT_IIC (0x1<<27)
  362. #define BIT_UTXD0 (0x1<<28)
  363. #define BIT_UTXD1 (0x1<<29)
  364. #define BIT_RTC (0x1<<30)
  365. #define BIT_ADC (0x1<<31)
  366. #define BIT_ALLMSK (0xFFFFFFFF)
  367. #define ClearPending(bit) {\
  368. rSRCPND = bit;\
  369. rINTPND = bit;\
  370. rINTPND;\
  371. }
  372. /* Wait until rINTPND is changed for the case that the ISR is very short. */
  373. #endif /*__S3C2400_H__*/