hardware.h 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. /********************************************************/
  2. /* */
  3. /* Samsung S3C44B0 */
  4. /* tpu <tapu@371.net> */
  5. /* */
  6. /********************************************************/
  7. #ifndef __ASM_ARCH_HARDWARE_H
  8. #define __ASM_ARCH_HARDWARE_H
  9. #define REGBASE 0x01c00000
  10. #define REGL(addr) (*(volatile unsigned int *)(REGBASE+addr))
  11. #define REGW(addr) (*(volatile unsigned short *)(REGBASE+addr))
  12. #define REGB(addr) (*(volatile unsigned char *)(REGBASE+addr))
  13. /*****************************/
  14. /* CPU Wrapper Registers */
  15. /*****************************/
  16. #define SYSCFG REGL(0x000000)
  17. #define NCACHBE0 REGL(0x000004)
  18. #define NCACHBE1 REGL(0x000008)
  19. #define SBUSCON REGL(0x040000)
  20. /************************************/
  21. /* Memory Controller Registers */
  22. /************************************/
  23. #define BWSCON REGL(0x080000)
  24. #define BANKCON0 REGL(0x080004)
  25. #define BANKCON1 REGL(0x080008)
  26. #define BANKCON2 REGL(0x08000c)
  27. #define BANKCON3 REGL(0x080010)
  28. #define BANKCON4 REGL(0x080014)
  29. #define BANKCON5 REGL(0x080018)
  30. #define BANKCON6 REGL(0x08001c)
  31. #define BANKCON7 REGL(0x080020)
  32. #define REFRESH REGL(0x080024)
  33. #define BANKSIZE REGL(0x080028)
  34. #define MRSRB6 REGL(0x08002c)
  35. #define MRSRB7 REGL(0x080030)
  36. /*********************/
  37. /* UART Registers */
  38. /*********************/
  39. #define ULCON0 REGL(0x100000)
  40. #define ULCON1 REGL(0x104000)
  41. #define UCON0 REGL(0x100004)
  42. #define UCON1 REGL(0x104004)
  43. #define UFCON0 REGL(0x100008)
  44. #define UFCON1 REGL(0x104008)
  45. #define UMCON0 REGL(0x10000c)
  46. #define UMCON1 REGL(0x10400c)
  47. #define UTRSTAT0 REGL(0x100010)
  48. #define UTRSTAT1 REGL(0x104010)
  49. #define UERSTAT0 REGL(0x100014)
  50. #define UERSTAT1 REGL(0x104014)
  51. #define UFSTAT0 REGL(0x100018)
  52. #define UFSTAT1 REGL(0x104018)
  53. #define UMSTAT0 REGL(0x10001c)
  54. #define UMSTAT1 REGL(0x10401c)
  55. #define UTXH0 REGB(0x100020)
  56. #define UTXH1 REGB(0x104020)
  57. #define URXH0 REGB(0x100024)
  58. #define URXH1 REGB(0x104024)
  59. #define UBRDIV0 REGL(0x100028)
  60. #define UBRDIV1 REGL(0x104028)
  61. /*******************/
  62. /* SIO Registers */
  63. /*******************/
  64. #define SIOCON REGL(0x114000)
  65. #define SIODAT REGL(0x114004)
  66. #define SBRDR REGL(0x114008)
  67. #define ITVCNT REGL(0x11400c)
  68. #define DCNTZ REGL(0x114010)
  69. /********************/
  70. /* IIS Registers */
  71. /********************/
  72. #define IISCON REGL(0x118000)
  73. #define IISMOD REGL(0x118004)
  74. #define IISPSR REGL(0x118008)
  75. #define IISFIFCON REGL(0x11800c)
  76. #define IISFIF REGW(0x118010)
  77. /**************************/
  78. /* I/O Ports Registers */
  79. /**************************/
  80. #define PCONA REGL(0x120000)
  81. #define PDATA REGL(0x120004)
  82. #define PCONB REGL(0x120008)
  83. #define PDATB REGL(0x12000c)
  84. #define PCONC REGL(0x120010)
  85. #define PDATC REGL(0x120014)
  86. #define PUPC REGL(0x120018)
  87. #define PCOND REGL(0x12001c)
  88. #define PDATD REGL(0x120020)
  89. #define PUPD REGL(0x120024)
  90. #define PCONE REGL(0x120028)
  91. #define PDATE REGL(0x12002c)
  92. #define PUPE REGL(0x120030)
  93. #define PCONF REGL(0x120034)
  94. #define PDATF REGL(0x120038)
  95. #define PUPF REGL(0x12003c)
  96. #define PCONG REGL(0x120040)
  97. #define PDATG REGL(0x120044)
  98. #define PUPG REGL(0x120048)
  99. #define SPUCR REGL(0x12004c)
  100. #define EXTINT REGL(0x120050)
  101. #define EXTINTPND REGL(0x120054)
  102. /*********************************/
  103. /* WatchDog Timers Registers */
  104. /*********************************/
  105. #define WTCON REGL(0x130000)
  106. #define WTDAT REGL(0x130004)
  107. #define WTCNT REGL(0x130008)
  108. /*********************************/
  109. /* A/D Converter Registers */
  110. /*********************************/
  111. #define ADCCON REGL(0x140000)
  112. #define ADCPSR REGL(0x140004)
  113. #define ADCDAT REGL(0x140008)
  114. /***************************/
  115. /* PWM Timer Registers */
  116. /***************************/
  117. #define TCFG0 REGL(0x150000)
  118. #define TCFG1 REGL(0x150004)
  119. #define TCON REGL(0x150008)
  120. #define TCNTB0 REGL(0x15000c)
  121. #define TCMPB0 REGL(0x150010)
  122. #define TCNTO0 REGL(0x150014)
  123. #define TCNTB1 REGL(0x150018)
  124. #define TCMPB1 REGL(0x15001c)
  125. #define TCNTO1 REGL(0x150020)
  126. #define TCNTB2 REGL(0x150024)
  127. #define TCMPB2 REGL(0x150028)
  128. #define TCNTO2 REGL(0x15002c)
  129. #define TCNTB3 REGL(0x150030)
  130. #define TCMPB3 REGL(0x150034)
  131. #define TCNTO3 REGL(0x150038)
  132. #define TCNTB4 REGL(0x15003c)
  133. #define TCMPB4 REGL(0x150040)
  134. #define TCNTO4 REGL(0x150044)
  135. #define TCNTB5 REGL(0x150048)
  136. #define TCNTO5 REGL(0x15004c)
  137. /*********************/
  138. /* IIC Registers */
  139. /*********************/
  140. #define IICCON REGL(0x160000)
  141. #define IICSTAT REGL(0x160004)
  142. #define IICADD REGL(0x160008)
  143. #define IICDS REGL(0x16000c)
  144. /*********************/
  145. /* RTC Registers */
  146. /*********************/
  147. #define RTCCON REGB(0x170040)
  148. #define RTCALM REGB(0x170050)
  149. #define ALMSEC REGB(0x170054)
  150. #define ALMMIN REGB(0x170058)
  151. #define ALMHOUR REGB(0x17005c)
  152. #define ALMDAY REGB(0x170060)
  153. #define ALMMON REGB(0x170064)
  154. #define ALMYEAR REGB(0x170068)
  155. #define RTCRST REGB(0x17006c)
  156. #define BCDSEC REGB(0x170070)
  157. #define BCDMIN REGB(0x170074)
  158. #define BCDHOUR REGB(0x170078)
  159. #define BCDDAY REGB(0x17007c)
  160. #define BCDDATE REGB(0x170080)
  161. #define BCDMON REGB(0x170084)
  162. #define BCDYEAR REGB(0x170088)
  163. #define TICINT REGB(0x17008c)
  164. /*********************************/
  165. /* Clock & Power Registers */
  166. /*********************************/
  167. #define PLLCON REGL(0x180000)
  168. #define CLKCON REGL(0x180004)
  169. #define CLKSLOW REGL(0x180008)
  170. #define LOCKTIME REGL(0x18000c)
  171. /**************************************/
  172. /* Interrupt Controller Registers */
  173. /**************************************/
  174. #define INTCON REGL(0x200000)
  175. #define INTPND REGL(0x200004)
  176. #define INTMOD REGL(0x200008)
  177. #define INTMSK REGL(0x20000c)
  178. #define I_PSLV REGL(0x200010)
  179. #define I_PMST REGL(0x200014)
  180. #define I_CSLV REGL(0x200018)
  181. #define I_CMST REGL(0x20001c)
  182. #define I_ISPR REGL(0x200020)
  183. #define I_ISPC REGL(0x200024)
  184. #define F_ISPR REGL(0x200038)
  185. #define F_ISPC REGL(0x20003c)
  186. /********************************/
  187. /* LCD Controller Registers */
  188. /********************************/
  189. #define LCDCON1 REGL(0x300000)
  190. #define LCDCON2 REGL(0x300004)
  191. #define LCDSADDR1 REGL(0x300008)
  192. #define LCDSADDR2 REGL(0x30000c)
  193. #define LCDSADDR3 REGL(0x300010)
  194. #define REDLUT REGL(0x300014)
  195. #define GREENLUT REGL(0x300018)
  196. #define BLUELUT REGL(0x30001c)
  197. #define DP1_2 REGL(0x300020)
  198. #define DP4_7 REGL(0x300024)
  199. #define DP3_5 REGL(0x300028)
  200. #define DP2_3 REGL(0x30002c)
  201. #define DP5_7 REGL(0x300030)
  202. #define DP3_4 REGL(0x300034)
  203. #define DP4_5 REGL(0x300038)
  204. #define DP6_7 REGL(0x30003c)
  205. #define LCDCON3 REGL(0x300040)
  206. #define DITHMODE REGL(0x300044)
  207. /*********************/
  208. /* DMA Registers */
  209. /*********************/
  210. #define ZDCON0 REGL(0x280000)
  211. #define ZDISRC0 REGL(0x280004)
  212. #define ZDIDES0 REGL(0x280008)
  213. #define ZDICNT0 REGL(0x28000c)
  214. #define ZDCSRC0 REGL(0x280010)
  215. #define ZDCDES0 REGL(0x280014)
  216. #define ZDCCNT0 REGL(0x280018)
  217. #define ZDCON1 REGL(0x280020)
  218. #define ZDISRC1 REGL(0x280024)
  219. #define ZDIDES1 REGL(0x280028)
  220. #define ZDICNT1 REGL(0x28002c)
  221. #define ZDCSRC1 REGL(0x280030)
  222. #define ZDCDES1 REGL(0x280034)
  223. #define ZDCCNT1 REGL(0x280038)
  224. #define BDCON0 REGL(0x380000)
  225. #define BDISRC0 REGL(0x380004)
  226. #define BDIDES0 REGL(0x380008)
  227. #define BDICNT0 REGL(0x38000c)
  228. #define BDCSRC0 REGL(0x380010)
  229. #define BDCDES0 REGL(0x380014)
  230. #define BDCCNT0 REGL(0x380018)
  231. #define BDCON1 REGL(0x380020)
  232. #define BDISRC1 REGL(0x380024)
  233. #define BDIDES1 REGL(0x380028)
  234. #define BDICNT1 REGL(0x38002c)
  235. #define BDCSRC1 REGL(0x380030)
  236. #define BDCDES1 REGL(0x380034)
  237. #define BDCCNT1 REGL(0x380038)
  238. #define CLEAR_PEND_INT(n) I_ISPC = (1<<(n))
  239. #define INT_ENABLE(n) INTMSK &= ~(1<<(n))
  240. #define INT_DISABLE(n) INTMSK |= (1<<(n))
  241. #define HARD_RESET_NOW()
  242. #endif /* __ASM_ARCH_HARDWARE_H */