sep6200.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  1. /*
  2. * File : sep6200.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006 - 2013, RT-Thread Development Team
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along
  17. * with this program; if not, write to the Free Software Foundation, Inc.,
  18. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  19. *
  20. * Change Logs:
  21. * Date Author Notes
  22. * 2013-7-17 Peng Fan sep6200 implementation
  23. */
  24. #ifndef __SEP6200_H
  25. #define __SEP6200_H
  26. #include <rtthread.h>
  27. /*Core definations*/
  28. #define PRIVMODE 0x13
  29. #define Mode_USR 0x10
  30. #define Mode_REAL 0x11
  31. #define Mode_IRQ 0x12
  32. #define Mode_PRIV 0x13
  33. #define Mode_TRAP 0x17
  34. #define Mode_EXT 0x1B
  35. #define Mode_SUSR 0x1F
  36. /*
  37. * Address
  38. */
  39. #define SEP6200_VIC_BASE 0xb0000000
  40. #define SEP6200_PMU_BASE 0xb0001000
  41. #define SEP6200_RTC_BASE 0xb0002000
  42. #define SEP6200_TIMER_BASE 0xb0003000
  43. #define SEP6200_PWM_BASE 0xb0004000
  44. #define SEP6200_GPIO_BASE 0xb0006000
  45. #define SEP6200_TOUCH_ADC 0xb0007000
  46. #define SEP6200_SYSCTL_BASE 0xb0008000
  47. #define SEP6200_UART0_BASE 0xb1000000
  48. #define SEP6200_UART1_BASE 0xb1001000
  49. #define SEP6200_UART2_BASE 0xb1002000
  50. #define SEP6200_UART3_BASE 0xb1003000
  51. #define SEP6200_SSI1_BASE 0xb1004000
  52. #define SEP6200_SSI2_BASE 0xb1005000
  53. #define SEP6200_SSI3_BASE 0xb1006000
  54. #define SEP6200_I2C_BASE 0xb1007000
  55. #define SEP6200_I2S_BASE 0xb1008000
  56. #define SEP6200_USB_BASE 0xb1010000
  57. #define SEP6200_DMAC2_BASE 0xb1011000
  58. #define SEP6200_ESRAM_BASE 0xb2000000
  59. #define SEP6200_NORREG_BASE0xb2020000
  60. #define SEP6200_SDIO1_BASE 0xb2022000
  61. #define SEP6200_SDIO2_BASE 0xb2023000
  62. #define SEP6200_LCDC_BASE 0xb2025000
  63. #define SEP6200_VPU_BASE 0xb2026000
  64. #define SEP6200_DMAC1_BASE 0xb2027000
  65. #define SEP6200_DDR2_REG 0xb3000000
  66. #define SEP6200_DDR_MEM 0x40000000
  67. #define SEP6200_UART0_DLBL (SEP6200_UART0_BASE+0x00)
  68. #define SEP6200_UART0_RXFIFO (SEP6200_UART0_BASE+0x00)
  69. #define SEP6200_UART0_TXFIFO (SEP6200_UART0_BASE+0x00)
  70. #define SEP6200_UART0_DLBH (SEP6200_UART0_BASE+0x04)
  71. #define SEP6200_UART0_IER (SEP6200_UART0_BASE+0x04)
  72. #define SEP6200_UART0_IIR (SEP6200_UART0_BASE+0x08)
  73. #define SEP6200_UART0_FCR (SEP6200_UART0_BASE+0x08)
  74. #define SEP6200_UART0_LCR (SEP6200_UART0_BASE+0x0c)
  75. #define SEP6200_UART0_MCR (SEP6200_UART0_BASE+0x10)
  76. #define SEP6200_UART0_LSR (SEP6200_UART0_BASE+0x14)
  77. #define SEP6200_UART0_MSR (SEP6200_UART0_BASE+0x18)
  78. #define SEP6200_TIMER_T1LCR (SEP6200_TIMER_BASE + 0X000)
  79. #define SEP6200_TIMER_T1CCR (SEP6200_TIMER_BASE + 0X004)
  80. #define SEP6200_TIMER_T1CR (SEP6200_TIMER_BASE + 0X008)
  81. #define SEP6200_TIMER_T1ISCR (SEP6200_TIMER_BASE + 0X00C)
  82. #define SEP6200_TIMER_T1IMSR (SEP6200_TIMER_BASE + 0X010)
  83. #define SEP6200_TIMER_T2LCR (SEP6200_TIMER_BASE + 0X020)
  84. #define SEP6200_TIMER_T2CCR (SEP6200_TIMER_BASE + 0X024)
  85. #define SEP6200_TIMER_T2CR (SEP6200_TIMER_BASE + 0X028)
  86. #define SEP6200_TIMER_T2ISCR (SEP6200_TIMER_BASE + 0X02C)
  87. #define SEP6200_TIMER_T2IMSR (SEP6200_TIMER_BASE + 0X030)
  88. #define SEP6200_TIMER_T3LCR (SEP6200_TIMER_BASE + 0X040)
  89. #define SEP6200_TIMER_T3CCR (SEP6200_TIMER_BASE + 0X044)
  90. #define SEP6200_TIMER_T3CR (SEP6200_TIMER_BASE + 0X048)
  91. #define SEP6200_TIMER_T3ISCR (SEP6200_TIMER_BASE + 0X04C)
  92. #define SEP6200_TIMER_T3IMSR (SEP6200_TIMER_BASE + 0X050)
  93. #define SEP6200_TIMER_T3CAPR (SEP6200_TIMER_BASE + 0X054)
  94. #define SEP6200_TIMER_T4LCR (SEP6200_TIMER_BASE + 0X060)
  95. #define SEP6200_TIMER_T4CCR (SEP6200_TIMER_BASE + 0X064)
  96. #define SEP6200_TIMER_T4CR (SEP6200_TIMER_BASE + 0X068)
  97. #define SEP6200_TIMER_T4ISCR (SEP6200_TIMER_BASE + 0X06C)
  98. #define SEP6200_TIMER_T4IMSR (SEP6200_TIMER_BASE + 0X070)
  99. #define SEP6200_TIMER_T4CAPR (SEP6200_TIMER_BASE + 0X074)
  100. #define SEP6200_TIMER_T5LCR (SEP6200_TIMER_BASE + 0X080)
  101. #define SEP6200_TIMER_T5CCR (SEP6200_TIMER_BASE + 0X084)
  102. #define SEP6200_TIMER_T5CR (SEP6200_TIMER_BASE + 0X088)
  103. #define SEP6200_TIMER_T5ISCR (SEP6200_TIMER_BASE + 0X08C)
  104. #define SEP6200_TIMER_T5IMSR (SEP6200_TIMER_BASE + 0X090)
  105. #define SEP6200_TIMER_T5CAPR (SEP6200_TIMER_BASE + 0X094)
  106. #define SEP6200_TIMER_T6LCR (SEP6200_TIMER_BASE + 0X0A0)
  107. #define SEP6200_TIMER_T6CCR (SEP6200_TIMER_BASE + 0X0A4)
  108. #define SEP6200_TIMER_T6CR (SEP6200_TIMER_BASE + 0X0A8)
  109. #define SEP6200_TIMER_T6ISCR (SEP6200_TIMER_BASE + 0X0AC)
  110. #define SEP6200_TIMER_T6IMSR (SEP6200_TIMER_BASE + 0X0B0)
  111. #define SEP6200_TIMER_T6CAPR (SEP6200_TIMER_BASE + 0X0B4)
  112. #define SEP6200_TIMER_T7LCR (SEP6200_TIMER_BASE + 0X0C0)
  113. #define SEP6200_TIMER_T7CCR (SEP6200_TIMER_BASE + 0X0C4)
  114. #define SEP6200_TIMER_T7CR (SEP6200_TIMER_BASE + 0X0C8)
  115. #define SEP6200_TIMER_T7ISCR (SEP6200_TIMER_BASE + 0X0CC)
  116. #define SEP6200_TIMER_T7IMSR (SEP6200_TIMER_BASE + 0X0D0)
  117. #define SEP6200_TIMER_T8LCR (SEP6200_TIMER_BASE + 0X0E0)
  118. #define SEP6200_TIMER_T8CCR (SEP6200_TIMER_BASE + 0X0E4)
  119. #define SEP6200_TIMER_T8CR (SEP6200_TIMER_BASE + 0X0E8)
  120. #define SEP6200_TIMER_T8ISCR (SEP6200_TIMER_BASE + 0X0EC)
  121. #define SEP6200_TIMER_T8IMSR (SEP6200_TIMER_BASE + 0X0F0)
  122. #define SEP6200_TIMER_T9LCR (SEP6200_TIMER_BASE + 0X100)
  123. #define SEP6200_TIMER_T9CCR (SEP6200_TIMER_BASE + 0X104)
  124. #define SEP6200_TIMER_T9CR (SEP6200_TIMER_BASE + 0X108)
  125. #define SEP6200_TIMER_T9ISCR (SEP6200_TIMER_BASE + 0X10C)
  126. #define SEP6200_TIMER_T9IMSR (SEP6200_TIMER_BASE + 0X110)
  127. #define SEP6200_TIMER_T10LCR (SEP6200_TIMER_BASE + 0X120)
  128. #define SEP6200_TIMER_T10CCR (SEP6200_TIMER_BASE + 0X124)
  129. #define SEP6200_TIMER_T10CR (SEP6200_TIMER_BASE + 0X128)
  130. #define SEP6200_TIMER_T10ISCR (SEP6200_TIMER_BASE + 0X12C)
  131. #define SEP6200_TIMER_T10IMSR (SEP6200_TIMER_BASE + 0X130)
  132. #define SEP6200_TIMER_TIMSR (SEP6200_TIMER_BASE + 0X140)
  133. #define SEP6200_TIMER_TISCR (SEP6200_TIMER_BASE + 0X144)
  134. #define SEP6200_TIMER_TISR (SEP6200_TIMER_BASE + 0X148)
  135. #define SEP6200_VIC_INT_SLT_L (SEP6200_VIC_BASE + 0x000)
  136. #define SEP6200_VIC_INT_SLT_H (SEP6200_VIC_BASE + 0x004)
  137. #define SEP6200_VIC_INT_EN_L (SEP6200_VIC_BASE + 0x008)
  138. #define SEP6200_VIC_INT_EN_H (SEP6200_VIC_BASE + 0x00C)
  139. #define SEP6200_VIC_INT_EN_CLR_L (SEP6200_VIC_BASE + 0x010)
  140. #define SEP6200_VIC_INT_EN_CLR_H (SEP6200_VIC_BASE + 0x014)
  141. #define SEP6200_VIC_SFT_INT_L (SEP6200_VIC_BASE + 0x018)
  142. #define SEP6200_VIC_SFT_INT_H (SEP6200_VIC_BASE + 0x01C)
  143. #define SEP6200_VIC_SFT_INT_CLR_L (SEP6200_VIC_BASE + 0x020)
  144. #define SEP6200_VIC_SFT_INT_CLR_H (SEP6200_VIC_BASE + 0x024)
  145. #define SEP6200_VIC_INT_MSK_ALL (SEP6200_VIC_BASE + 0x028)
  146. #define SEP6200_VIC_RAW_INT_SRC_L (SEP6200_VIC_BASE + 0x030)
  147. #define SEP6200_VIC_RAW_INT_SRC_H (SEP6200_VIC_BASE + 0x034)
  148. #define SEP6200_VIC_RAW_IRQ_STS_L (SEP6200_VIC_BASE + 0x038)
  149. #define SEP6200_VIC_RAW_IRQ_STS_H (SEP6200_VIC_BASE + 0x03C)
  150. #define SEP6200_VIC_RAW_FIQ_STS_L (SEP6200_VIC_BASE + 0x040)
  151. #define SEP6200_VIC_RAW_FIQ_STS_H (SEP6200_VIC_BASE + 0x044)
  152. #define SEP6200_VIC_MSK_IRQ_STS_L (SEP6200_VIC_BASE + 0x048)
  153. #define SEP6200_VIC_MSK_IRQ_STS_H (SEP6200_VIC_BASE + 0x04C)
  154. #define SEP6200_VIC_MSK_FIQ_STS_L (SEP6200_VIC_BASE + 0x050)
  155. #define SEP6200_VIC_MSK_FIQ_STS_H (SEP6200_VIC_BASE + 0x054)
  156. #define SEP6200_VIC_IRQ_PENDING_L (SEP6200_VIC_BASE + 0x058)
  157. #define SEP6200_VIC_IRQ_PENDING_H (SEP6200_VIC_BASE + 0x05C)
  158. #define SEP6200_VIC_FIQ_PENDING_L (SEP6200_VIC_BASE + 0x060)
  159. #define SEP6200_VIC_FIQ_PENDING_H (SEP6200_VIC_BASE + 0x064)
  160. #define SEP6200_VIC_IRQ_VECTOR_BASE (SEP6200_VIC_BASE + 0x070)
  161. #define SEP6200_VIC_FIQ_VECTOR_BASE (SEP6200_VIC_BASE + 0x074)
  162. #define SEP6200_VIC_IRQ_VECTOR_NUM (SEP6200_VIC_BASE + 0x078)
  163. #define SEP6200_VIC_FIQ_VECTOR_NUM (SEP6200_VIC_BASE + 0x07C)
  164. #define SEP6200_VIC_IRQ_VECTOR_ADDR (SEP6200_VIC_BASE + 0x080)
  165. #define SEP6200_VIC_FIQ_VECTOR_ADDR (SEP6200_VIC_BASE + 0x084)
  166. #define SEP6200_VIC_PROIRTY_MASK (SEP6200_VIC_BASE + 0x090)
  167. #define SEP6200_VIC_VECTOR_PROIRTY00 (SEP6200_VIC_BASE + 0x100)
  168. #define SEP6200_VIC_VECTOR_PROIRTY01 (SEP6200_VIC_BASE + 0x104)
  169. #define SEP6200_VIC_VECTOR_PROIRTY02 (SEP6200_VIC_BASE + 0x108)
  170. #define SEP6200_VIC_VECTOR_PROIRTY03 (SEP6200_VIC_BASE + 0x10C)
  171. #define SEP6200_VIC_VECTOR_PROIRTY04 (SEP6200_VIC_BASE + 0x110)
  172. #define SEP6200_VIC_VECTOR_PROIRTY05 (SEP6200_VIC_BASE + 0x114)
  173. #define SEP6200_VIC_VECTOR_PROIRTY06 (SEP6200_VIC_BASE + 0x118)
  174. #define SEP6200_VIC_VECTOR_PROIRTY07 (SEP6200_VIC_BASE + 0x11C)
  175. #define SEP6200_VIC_VECTOR_PROIRTY08 (SEP6200_VIC_BASE + 0x120)
  176. #define SEP6200_VIC_VECTOR_PROIRTY09 (SEP6200_VIC_BASE + 0x124)
  177. #define SEP6200_VIC_VECTOR_PROIRTY10 (SEP6200_VIC_BASE + 0x128)
  178. #define SEP6200_VIC_VECTOR_PROIRTY11 (SEP6200_VIC_BASE + 0x12C)
  179. #define SEP6200_VIC_VECTOR_PROIRTY12 (SEP6200_VIC_BASE + 0x130)
  180. #define SEP6200_VIC_VECTOR_PROIRTY13 (SEP6200_VIC_BASE + 0x134)
  181. #define SEP6200_VIC_VECTOR_PROIRTY14 (SEP6200_VIC_BASE + 0x138)
  182. #define SEP6200_VIC_VECTOR_PROIRTY15 (SEP6200_VIC_BASE + 0x13C)
  183. #define SEP6200_VIC_VECTOR_PROIRTY16 (SEP6200_VIC_BASE + 0x140)
  184. #define SEP6200_VIC_VECTOR_PROIRTY17 (SEP6200_VIC_BASE + 0x144)
  185. #define SEP6200_VIC_VECTOR_PROIRTY18 (SEP6200_VIC_BASE + 0x148)
  186. #define SEP6200_VIC_VECTOR_PROIRTY19 (SEP6200_VIC_BASE + 0x14C)
  187. #define SEP6200_VIC_VECTOR_PROIRTY20 (SEP6200_VIC_BASE + 0x150)
  188. #define SEP6200_VIC_VECTOR_PROIRTY21 (SEP6200_VIC_BASE + 0x154)
  189. #define SEP6200_VIC_VECTOR_PROIRTY22 (SEP6200_VIC_BASE + 0x158)
  190. #define SEP6200_VIC_VECTOR_PROIRTY23 (SEP6200_VIC_BASE + 0x15C)
  191. #define SEP6200_VIC_VECTOR_PROIRTY24 (SEP6200_VIC_BASE + 0x160)
  192. #define SEP6200_VIC_VECTOR_PROIRTY25 (SEP6200_VIC_BASE + 0x164)
  193. #define SEP6200_VIC_VECTOR_PROIRTY26 (SEP6200_VIC_BASE + 0x168)
  194. #define SEP6200_VIC_VECTOR_PROIRTY27 (SEP6200_VIC_BASE + 0x16C)
  195. #define SEP6200_VIC_VECTOR_PROIRTY28 (SEP6200_VIC_BASE + 0x170)
  196. #define SEP6200_VIC_VECTOR_PROIRTY29 (SEP6200_VIC_BASE + 0x174)
  197. #define SEP6200_VIC_VECTOR_PROIRTY30 (SEP6200_VIC_BASE + 0x178)
  198. #define SEP6200_VIC_VECTOR_PROIRTY31 (SEP6200_VIC_BASE + 0x17C)
  199. #define SEP6200_VIC_VECTOR_PROIRTY32 (SEP6200_VIC_BASE + 0x180)
  200. #define SEP6200_VIC_VECTOR_PROIRTY33 (SEP6200_VIC_BASE + 0x184)
  201. #define SEP6200_VIC_VECTOR_PROIRTY34 (SEP6200_VIC_BASE + 0x188)
  202. #define SEP6200_VIC_VECTOR_PROIRTY35 (SEP6200_VIC_BASE + 0x18C)
  203. #define SEP6200_VIC_VECTOR_PROIRTY36 (SEP6200_VIC_BASE + 0x190)
  204. #define SEP6200_VIC_VECTOR_PROIRTY37 (SEP6200_VIC_BASE + 0x194)
  205. #define SEP6200_VIC_VECTOR_PROIRTY38 (SEP6200_VIC_BASE + 0x198)
  206. #define SEP6200_VIC_VECTOR_PROIRTY39 (SEP6200_VIC_BASE + 0x19C)
  207. #define SEP6200_VIC_VECTOR_PROIRTY40 (SEP6200_VIC_BASE + 0x1A0)
  208. #define SEP6200_VIC_VECTOR_PROIRTY41 (SEP6200_VIC_BASE + 0x1A4)
  209. #define SEP6200_VIC_VECTOR_PROIRTY42 (SEP6200_VIC_BASE + 0x1A8)
  210. #define SEP6200_VIC_VECTOR_PROIRTY43 (SEP6200_VIC_BASE + 0x1AC)
  211. #define SEP6200_VIC_VECTOR_PROIRTY44 (SEP6200_VIC_BASE + 0x1B0)
  212. #define SEP6200_VIC_VECTOR_PROIRTY45 (SEP6200_VIC_BASE + 0x1B4)
  213. #define SEP6200_VIC_VECTOR_PROIRTY46 (SEP6200_VIC_BASE + 0x1B8)
  214. #define SEP6200_VIC_VECTOR_PROIRTY47 (SEP6200_VIC_BASE + 0x1BC)
  215. #define SEP6200_VIC_VECTOR_PROIRTY48 (SEP6200_VIC_BASE + 0x1C0)
  216. #define SEP6200_VIC_VECTOR_PROIRTY49 (SEP6200_VIC_BASE + 0x1C4)
  217. #define SEP6200_VIC_VECTOR_PROIRTY50 (SEP6200_VIC_BASE + 0x1C8)
  218. #define SEP6200_VIC_VECTOR_PROIRTY51 (SEP6200_VIC_BASE + 0x1CC)
  219. #define SEP6200_VIC_VECTOR_PROIRTY52 (SEP6200_VIC_BASE + 0x1D0)
  220. #define SEP6200_VIC_VECTOR_PROIRTY53 (SEP6200_VIC_BASE + 0x1D4)
  221. #define SEP6200_VIC_VECTOR_PROIRTY54 (SEP6200_VIC_BASE + 0x1D8)
  222. #define SEP6200_VIC_VECTOR_PROIRTY55 (SEP6200_VIC_BASE + 0x1DC)
  223. #define SEP6200_VIC_VECTOR_PROIRTY56 (SEP6200_VIC_BASE + 0x1E0)
  224. #define SEP6200_VIC_VECTOR_PROIRTY57 (SEP6200_VIC_BASE + 0x1E4)
  225. #define SEP6200_VIC_VECTOR_PROIRTY58 (SEP6200_VIC_BASE + 0x1E8)
  226. #define SEP6200_VIC_VECTOR_PROIRTY59 (SEP6200_VIC_BASE + 0x1EC)
  227. #define SEP6200_VIC_VECTOR_PROIRTY60 (SEP6200_VIC_BASE + 0x1F0)
  228. #define SEP6200_VIC_VECTOR_PROIRTY61 (SEP6200_VIC_BASE + 0x1F4)
  229. #define SEP6200_VIC_VECTOR_PROIRTY62 (SEP6200_VIC_BASE + 0x1F8)
  230. #define SEP6200_VIC_VECTOR_PROIRTY63 (SEP6200_VIC_BASE + 0x1FC)
  231. #define SEP6200_PMU_PLL_SET (SEP6200_PMU_BASE + 0x000)
  232. #define SEP6200_PMU_APLL_CFG (SEP6200_PMU_BASE + 0x004)
  233. #define SEP6200_PMU_MPLL_GFG (SEP6200_PMU_BASE + 0x008)
  234. #define SEP6200_PMU_DPLL_CFG (SEP6200_PMU_BASE + 0x00C)
  235. #define SEP6200_PMU_PMDR (SEP6200_PMU_BASE + 0x010)
  236. #define SEP6200_PMU_CLK_GT_CFG1 (SEP6200_PMU_BASE + 0x014)
  237. #define SEP6200_PMU_CLK_GT_CFG2 (SEP6200_PMU_BASE + 0x018)
  238. #define SEP6200_PMU_PWR_GT_CFG (SEP6200_PMU_BASE + 0x01C)
  239. #define SEP6200_PMU_AHB_CLK_CFG (SEP6200_PMU_BASE + 0x020)
  240. #define SEP6200_PMU_ARM_CLK_CFG (SEP6200_PMU_BASE + 0x024)
  241. #define SEP6200_PMU_DDR_CLK_CFG (SEP6200_PMU_BASE + 0x028)
  242. #define SEP6200_PMU_PIX_CLK_CFG (SEP6200_PMU_BASE + 0x02C)
  243. #define SEP6200_PMU_GPU_CLK2X_CFG (SEP6200_PMU_BASE + 0x030)
  244. #define SEP6200_PMU_DIV_SET (SEP6200_PMU_BASE + 0x034)
  245. #define SEP6200_PMU_CRYSTAL_CFG (SEP6200_PMU_BASE + 0x038)
  246. #define SEP6200_PMU_MSK_WAKEUP (SEP6200_PMU_BASE + 0x03C)
  247. #define SEP6200_PMU_RTCR (SEP6200_PMU_BASE + 0x040)
  248. #define SEP6200_PMU_CLR_WAKEUP (SEP6200_PMU_BASE + 0x044)
  249. #define SEP6200_PMU_WAKEUP_TIME (SEP6200_PMU_BASE + 0x048)
  250. #define SEP6200_PMU_SLEEP_FLAG (SEP6200_PMU_BASE + 0x04C)
  251. #define SEP6200_PMU_WAIT_PWR_SWITCH (SEP6200_PMU_BASE + 0x050)
  252. #define SEP6200_PMU_PWR_STATE (SEP6200_PMU_BASE + 0x054)
  253. #define SEP6200_PMU_INT_POL_SEL (SEP6200_PMU_BASE + 0x058)
  254. #define SEP6200_PMU_PLLLD (SEP6200_PMU_BASE + 0x05C)
  255. #define SEP6200_PMU_IC_ENABLE (SEP6200_PMU_BASE + 0x060)
  256. #define SEP6200_PMU_IC_TAR (SEP6200_PMU_BASE + 0x064)
  257. #define SEP6200_PMU_IC_SCL_LCNT (SEP6200_PMU_BASE + 0x068)
  258. #define SEP6200_PMU_IC_SCL_HCNT (SEP6200_PMU_BASE + 0x06C)
  259. #define SEP6200_PMU_IC_DATA_CMD (SEP6200_PMU_BASE + 0x070)
  260. #define SEP6200_PMU_IC_STATE (SEP6200_PMU_BASE + 0x074)
  261. #define SEP6200_PMU_IC_SET (SEP6200_PMU_BASE + 0x078)
  262. #define SEP6200_PMU_HA_PWR_OFF_DAT (SEP6200_PMU_BASE + 0x07C)
  263. #define SEP6200_PMU_HA_PWR_ON_DAT (SEP6200_PMU_BASE + 0x080)
  264. #define SEP6200_PMU_HA_PWR_OFF_DAT_CNT (SEP6200_PMU_BASE + 0x084)
  265. #define SEP6200_PMU_HA_PWR_ON_DAT_CNT (SEP6200_PMU_BASE + 0x088)
  266. #define SEP6200_PMU_PWR_OFF_TIME (SEP6200_PMU_BASE + 0x08C)
  267. #define SEP6200_PMU_PWR_ON_TIME (SEP6200_PMU_BASE + 0x090)
  268. #define SEP6200_PMU_PWR_ON_POL_SEL (SEP6200_PMU_BASE + 0x094)
  269. #define SEP6200_PMU_RETURN_ADDR (SEP6200_PMU_BASE + 0x098)
  270. #define SEP6200_PMU_INT (SEP6200_PMU_BASE + 0x09C)
  271. /* define the interrupt source number */
  272. #define INTSRC_RESERVE2 63
  273. #define INTSRC_RESERVE1 62
  274. #define INTSRC_LCDC 61
  275. #define INTSRC_GPU 60
  276. #define INTSRC_VPU 59
  277. #define INTSRC_TIMER3 58
  278. #define INTSRC_TIMER2 57
  279. #define INTSRC_TIMER1 56
  280. #define INTSRC_NAND 55
  281. #define INTSRC_I2S 54
  282. #define INTSRC_I2C3 53
  283. #define INTSRC_I2C2 52
  284. #define INTSRC_I2C1 51
  285. #define INTSRC_SSI3 50
  286. #define INTSRC_SSI2 49
  287. #define INTSRC_SSI1 48
  288. #define INTSRC_SDIO2 47
  289. #define INTSRC_SDIO1 46
  290. #define INTSRC_UART3 45
  291. #define INTSRC_UART2 44
  292. #define INTSRC_UART1 43
  293. #define INTSRC_UART0 42
  294. #define INTSRC_PWM 41
  295. #define INTSRC_USB 40
  296. #define INTSRC_USBDMA 39
  297. #define INTSRC_DMAC2 38
  298. #define INTSRC_DMAC1 37
  299. #define INTSRC_PMUIRQ_A11 36
  300. #define INTSRC_DMAIRQ_A11 35
  301. #define INTSRC_GPS 34
  302. #define INTSRC_RTC 33
  303. #define INTSRC_RESERVED16 32
  304. #define INTSRC_PORTE12 31
  305. #define INTSRC_PORTE11 30
  306. #define INTSRC_PORTE10 29
  307. #define INTSRC_PORTE9 28
  308. #define INTSRC_PORTE5 27
  309. #define INTSRC_PORTE4 26
  310. #define INTSRC_PORTD9 25
  311. #define INTSRC_PORTD8 24
  312. #define INTSRC_PORTD3 23
  313. #define INTSRC_PORTD2 22
  314. #define INTSRC_PORTD1 21
  315. #define INTSRC_PORTD0 20
  316. #define INTSRC_PORTC3 19
  317. #define INTSRC_PORTC2 18
  318. #define INTSRC_PORTC1 17
  319. #define INTSRC_PORTC0 16
  320. #define INTSRC_EXT15 15
  321. #define INTSRC_EXT14 14
  322. #define INTSRC_EXT13 13
  323. #define INTSRC_EXT12 12
  324. #define INTSRC_EXT11 11
  325. #define INTSRC_EXT10 10
  326. #define INTSRC_EXT9 9
  327. #define INTSRC_EXT8 8
  328. #define INTSRC_EXT7 7
  329. #define INTSRC_EXT6 6
  330. #define INTSRC_EXT5 5
  331. #define INTSRC_EXT4 4
  332. #define INTSRC_AO_EXT3 3
  333. #define INTSRC_AO_EXT2 2
  334. #define INTSRC_AO_EXT1 1
  335. #define INTSRC_AO_EXT0 0
  336. typedef char S8; /* signed 8-bit integer */
  337. typedef short S16; /* signed 16-bit integer */
  338. typedef long S32; /* signed 32-bit integer */
  339. typedef unsigned char U8; /* unsigned 8-bit integer */
  340. typedef unsigned short U16; /* unsigned 16-bit integer */
  341. typedef unsigned long U32; /* unsigned 32-bit integer */
  342. typedef volatile U32 * RP;
  343. typedef volatile U16 * RP16;
  344. typedef volatile U8 * RP8;
  345. typedef void *VP; /* pointer to an unpredictable data type */
  346. typedef void (*FP)(); /* program start address */
  347. #ifndef _BOOL_TYPE_
  348. #define _BOOL_TYPE_
  349. typedef int BOOL; /* Boolean value. TRUE (1) or FALSE (0). */
  350. #endif
  351. typedef int ER; /* Error code. A signed integer. */
  352. /**
  353. * IO definitions
  354. *
  355. * define access restrictions to peripheral registers
  356. */
  357. #define __I volatile const /*!< defines 'read only' permissions */
  358. #define __O volatile /*!< defines 'write only' permissions */
  359. #define __IO volatile /*!< defines 'read / write' permissions */
  360. #define __iomem volatile
  361. /*Macros for debug*/
  362. #define EOUT(fmt,...) \
  363. do \
  364. { \
  365. rt_kprintf("EOUT:(%s:%i) ",__FILE__,__LINE__); \
  366. rt_kprintf(fmt,##__VA_ARGS__); \
  367. }while(0)
  368. #define RT_DEBUG
  369. #ifdef RT_DEBUG
  370. #define DBOUT(fmt,...) \
  371. do \
  372. { \
  373. rt_kprintf("DBOUT:(%s:%i) ",__FILE__,__LINE__); \
  374. rt_kprintf(fmt,##__VA_ARGS__); \
  375. }while(0)
  376. #else
  377. #define DBOUT(fmt,...) \
  378. do{}while(0)
  379. #endif
  380. #ifdef RT_DEBUG
  381. #define ASSERT(arg) \
  382. if((arg) == 0) \
  383. { \
  384. while(1) \
  385. { \
  386. rt_kprintf("have a assert failure\n"); \
  387. } \
  388. }
  389. #else
  390. #define ASSERT(arg) \
  391. do \
  392. { \
  393. }while(0)
  394. #endif
  395. #define write_reg(reg,value) \
  396. do \
  397. { \
  398. *(RP)(reg) = value; \
  399. }while(0)
  400. #define read_reg(reg) (*(RP)reg)
  401. struct rt_hw_register
  402. {
  403. rt_uint32_t r0;
  404. rt_uint32_t r1;
  405. rt_uint32_t r2;
  406. rt_uint32_t r3;
  407. rt_uint32_t r4;
  408. rt_uint32_t r5;
  409. rt_uint32_t r6;
  410. rt_uint32_t r7;
  411. rt_uint32_t r8;
  412. rt_uint32_t r9;
  413. rt_uint32_t r10;
  414. rt_uint32_t r11;
  415. rt_uint32_t r12;
  416. rt_uint32_t r13;
  417. rt_uint32_t r14;
  418. rt_uint32_t r15;
  419. rt_uint32_t r16;
  420. rt_uint32_t r17;
  421. rt_uint32_t r18;
  422. rt_uint32_t r19;
  423. rt_uint32_t r20;
  424. rt_uint32_t r21;
  425. rt_uint32_t r22;
  426. rt_uint32_t r23;
  427. rt_uint32_t r24;
  428. rt_uint32_t sb;
  429. rt_uint32_t sl;
  430. rt_uint32_t fp;
  431. rt_uint32_t ip;
  432. rt_uint32_t sp;
  433. rt_uint32_t lr;
  434. rt_uint32_t pc;
  435. rt_uint32_t asr;
  436. rt_uint32_t bsr;
  437. rt_uint32_t ORIG_r0;
  438. };
  439. /*@}*/
  440. #endif