immap_5272.h 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  1. /*
  2. * MCF5272 Internal Memory Map
  3. *
  4. * Copyright (c) 2003 Josef Baumgartner <josef.baumgartner@telex.de>
  5. *
  6. * See file CREDITS for list of people who contributed to this
  7. * project.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of
  12. * the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  22. * MA 02111-1307 USA
  23. */
  24. #ifndef __IMMAP_5272__
  25. #define __IMMAP_5272__
  26. #define MMAP_CFG (CFG_MBAR + 0x00000000)
  27. #define MMAP_INTC (CFG_MBAR + 0x00000020)
  28. #define MMAP_FBCS (CFG_MBAR + 0x00000040)
  29. #define MMAP_GPIO (CFG_MBAR + 0x00000080)
  30. #define MMAP_QSPI (CFG_MBAR + 0x000000A0)
  31. #define MMAP_PWM (CFG_MBAR + 0x000000C0)
  32. #define MMAP_DMA0 (CFG_MBAR + 0x000000E0)
  33. #define MMAP_UART0 (CFG_MBAR + 0x00000100)
  34. #define MMAP_UART1 (CFG_MBAR + 0x00000140)
  35. #define MMAP_SDRAM (CFG_MBAR + 0x00000180)
  36. #define MMAP_TMR0 (CFG_MBAR + 0x00000200)
  37. #define MMAP_TMR1 (CFG_MBAR + 0x00000220)
  38. #define MMAP_TMR2 (CFG_MBAR + 0x00000240)
  39. #define MMAP_TMR3 (CFG_MBAR + 0x00000260)
  40. #define MMAP_WDOG (CFG_MBAR + 0x00000280)
  41. #define MMAP_PLIC (CFG_MBAR + 0x00000300)
  42. #define MMAP_FEC (CFG_MBAR + 0x00000840)
  43. #define MMAP_USB (CFG_MBAR + 0x00001000)
  44. /* System configuration registers */
  45. typedef struct sys_ctrl {
  46. uint sc_mbar;
  47. ushort sc_scr;
  48. ushort sc_spr;
  49. uint sc_pmr;
  50. char res1[2];
  51. ushort sc_alpr;
  52. uint sc_dir;
  53. char res2[12];
  54. } sysctrl_t;
  55. /* Interrupt module registers */
  56. typedef struct int_ctrl {
  57. uint int_icr1;
  58. uint int_icr2;
  59. uint int_icr3;
  60. uint int_icr4;
  61. uint int_isr;
  62. uint int_pitr;
  63. uint int_piwr;
  64. uchar res1[3];
  65. uchar int_pivr;
  66. } intctrl_t;
  67. /* Chip select module registers */
  68. typedef struct cs_ctlr {
  69. uint cs_br0;
  70. uint cs_or0;
  71. uint cs_br1;
  72. uint cs_or1;
  73. uint cs_br2;
  74. uint cs_or2;
  75. uint cs_br3;
  76. uint cs_or3;
  77. uint cs_br4;
  78. uint cs_or4;
  79. uint cs_br5;
  80. uint cs_or5;
  81. uint cs_br6;
  82. uint cs_or6;
  83. uint cs_br7;
  84. uint cs_or7;
  85. } csctrl_t;
  86. /* GPIO port registers */
  87. typedef struct gpio_ctrl {
  88. uint gpio_pacnt;
  89. ushort gpio_paddr;
  90. ushort gpio_padat;
  91. uint gpio_pbcnt;
  92. ushort gpio_pbddr;
  93. ushort gpio_pbdat;
  94. uchar res1[4];
  95. ushort gpio_pcddr;
  96. ushort gpio_pcdat;
  97. uint gpio_pdcnt;
  98. uchar res2[4];
  99. } gpio_t;
  100. /* QSPI module registers */
  101. typedef struct qspi_ctrl {
  102. ushort qspi_qmr;
  103. uchar res1[2];
  104. ushort qspi_qdlyr;
  105. uchar res2[2];
  106. ushort qspi_qwr;
  107. uchar res3[2];
  108. ushort qspi_qir;
  109. uchar res4[2];
  110. ushort qspi_qar;
  111. uchar res5[2];
  112. ushort qspi_qdr;
  113. uchar res6[10];
  114. } qspi_t;
  115. /* PWM module registers */
  116. typedef struct pwm_ctrl {
  117. uchar pwm_pwcr0;
  118. uchar res1[3];
  119. uchar pwm_pwcr1;
  120. uchar res2[3];
  121. uchar pwm_pwcr2;
  122. uchar res3[7];
  123. uchar pwm_pwwd0;
  124. uchar res4[3];
  125. uchar pwm_pwwd1;
  126. uchar res5[3];
  127. uchar pwm_pwwd2;
  128. uchar res6[7];
  129. } pwm_t;
  130. /* DMA module registers */
  131. typedef struct dma_ctrl {
  132. ulong dma_dmr;
  133. uchar res1[2];
  134. ushort dma_dir;
  135. ulong dma_dbcr;
  136. ulong dma_dsar;
  137. ulong dma_ddar;
  138. uchar res2[12];
  139. } dma_t;
  140. /* SDRAM controller registers, offset: 0x180 */
  141. typedef struct sdram_ctrl {
  142. uchar res1[2];
  143. ushort sdram_sdcr;
  144. uchar res2[2];
  145. ushort sdram_sdtr;
  146. uchar res3[120];
  147. } sdramctrl_t;
  148. /* Watchdog registers */
  149. typedef struct wdog_ctrl {
  150. ushort wdog_wrrr;
  151. ushort res1;
  152. ushort wdog_wirr;
  153. ushort res2;
  154. ushort wdog_wcr;
  155. ushort res3;
  156. ushort wdog_wer;
  157. uchar res4[114];
  158. } wdog_t;
  159. /* PLIC module registers */
  160. typedef struct plic_ctrl {
  161. ulong plic_p0b1rr;
  162. ulong plic_p1b1rr;
  163. ulong plic_p2b1rr;
  164. ulong plic_p3b1rr;
  165. ulong plic_p0b2rr;
  166. ulong plic_p1b2rr;
  167. ulong plic_p2b2rr;
  168. ulong plic_p3b2rr;
  169. uchar plic_p0drr;
  170. uchar plic_p1drr;
  171. uchar plic_p2drr;
  172. uchar plic_p3drr;
  173. uchar res1[4];
  174. ulong plic_p0b1tr;
  175. ulong plic_p1b1tr;
  176. ulong plic_p2b1tr;
  177. ulong plic_p3b1tr;
  178. ulong plic_p0b2tr;
  179. ulong plic_p1b2tr;
  180. ulong plic_p2b2tr;
  181. ulong plic_p3b2tr;
  182. uchar plic_p0dtr;
  183. uchar plic_p1dtr;
  184. uchar plic_p2dtr;
  185. uchar plic_p3dtr;
  186. uchar res2[4];
  187. ushort plic_p0cr;
  188. ushort plic_p1cr;
  189. ushort plic_p2cr;
  190. ushort plic_p3cr;
  191. ushort plic_p0icr;
  192. ushort plic_p1icr;
  193. ushort plic_p2icr;
  194. ushort plic_p3icr;
  195. ushort plic_p0gmr;
  196. ushort plic_p1gmr;
  197. ushort plic_p2gmr;
  198. ushort plic_p3gmr;
  199. ushort plic_p0gmt;
  200. ushort plic_p1gmt;
  201. ushort plic_p2gmt;
  202. ushort plic_p3gmt;
  203. uchar res3;
  204. uchar plic_pgmts;
  205. uchar plic_pgmta;
  206. uchar res4;
  207. uchar plic_p0gcir;
  208. uchar plic_p1gcir;
  209. uchar plic_p2gcir;
  210. uchar plic_p3gcir;
  211. uchar plic_p0gcit;
  212. uchar plic_p1gcit;
  213. uchar plic_p2gcit;
  214. uchar plic_p3gcit;
  215. uchar res5[3];
  216. uchar plic_pgcitsr;
  217. uchar res6[3];
  218. uchar plic_pdcsr;
  219. ushort plic_p0psr;
  220. ushort plic_p1psr;
  221. ushort plic_p2psr;
  222. ushort plic_p3psr;
  223. ushort plic_pasr;
  224. uchar res7;
  225. uchar plic_plcr;
  226. ushort res8;
  227. ushort plic_pdrqr;
  228. ushort plic_p0sdr;
  229. ushort plic_p1sdr;
  230. ushort plic_p2sdr;
  231. ushort plic_p3sdr;
  232. ushort res9;
  233. ushort plic_pcsr;
  234. uchar res10[1184];
  235. } plic_t;
  236. /* USB module registers */
  237. typedef struct usb {
  238. ushort res1;
  239. ushort usb_fnr;
  240. ushort res2;
  241. ushort usb_fnmr;
  242. ushort res3;
  243. ushort usb_rfmr;
  244. ushort res4;
  245. ushort usb_rfmmr;
  246. uchar res5[3];
  247. uchar usb_far;
  248. ulong usb_asr;
  249. ulong usb_drr1;
  250. ulong usb_drr2;
  251. ushort res6;
  252. ushort usb_specr;
  253. ushort res7;
  254. ushort usb_ep0sr;
  255. ulong usb_iep0cfg;
  256. ulong usb_oep0cfg;
  257. ulong usb_ep1cfg;
  258. ulong usb_ep2cfg;
  259. ulong usb_ep3cfg;
  260. ulong usb_ep4cfg;
  261. ulong usb_ep5cfg;
  262. ulong usb_ep6cfg;
  263. ulong usb_ep7cfg;
  264. ulong usb_ep0ctl;
  265. ushort res8;
  266. ushort usb_ep1ctl;
  267. ushort res9;
  268. ushort usb_ep2ctl;
  269. ushort res10;
  270. ushort usb_ep3ctl;
  271. ushort res11;
  272. ushort usb_ep4ctl;
  273. ushort res12;
  274. ushort usb_ep5ctl;
  275. ushort res13;
  276. ushort usb_ep6ctl;
  277. ushort res14;
  278. ushort usb_ep7ctl;
  279. ulong usb_ep0isr;
  280. ushort res15;
  281. ushort usb_ep1isr;
  282. ushort res16;
  283. ushort usb_ep2isr;
  284. ushort res17;
  285. ushort usb_ep3isr;
  286. ushort res18;
  287. ushort usb_ep4isr;
  288. ushort res19;
  289. ushort usb_ep5isr;
  290. ushort res20;
  291. ushort usb_ep6isr;
  292. ushort res21;
  293. ushort usb_ep7isr;
  294. ulong usb_ep0imr;
  295. ushort res22;
  296. ushort usb_ep1imr;
  297. ushort res23;
  298. ushort usb_ep2imr;
  299. ushort res24;
  300. ushort usb_ep3imr;
  301. ushort res25;
  302. ushort usb_ep4imr;
  303. ushort res26;
  304. ushort usb_ep5imr;
  305. ushort res27;
  306. ushort usb_ep6imr;
  307. ushort res28;
  308. ushort usb_ep7imr;
  309. ulong usb_ep0dr;
  310. ulong usb_ep1dr;
  311. ulong usb_ep2dr;
  312. ulong usb_ep3dr;
  313. ulong usb_ep4dr;
  314. ulong usb_ep5dr;
  315. ulong usb_ep6dr;
  316. ulong usb_ep7dr;
  317. ushort res29;
  318. ushort usb_ep0dpr;
  319. ushort res30;
  320. ushort usb_ep1dpr;
  321. ushort res31;
  322. ushort usb_ep2dpr;
  323. ushort res32;
  324. ushort usb_ep3dpr;
  325. ushort res33;
  326. ushort usb_ep4dpr;
  327. ushort res34;
  328. ushort usb_ep5dpr;
  329. ushort res35;
  330. ushort usb_ep6dpr;
  331. ushort res36;
  332. ushort usb_ep7dpr;
  333. uchar res37[788];
  334. uchar usb_cfgram[1024];
  335. } usb_t;
  336. #endif /* __IMMAP_5272__ */