5xx_immap.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  1. /*
  2. * (C) Copyright 2003
  3. * Martin Winistoerfer, martinwinistoerfer@gmx.ch.
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation,
  21. */
  22. /*
  23. * File: 5xx_immap.h
  24. *
  25. * Discription: MPC555 Internal Memory Map
  26. *
  27. */
  28. #ifndef __IMMAP_5XX__
  29. #define __IMMAP_5XX__
  30. /* System Configuration Registers.
  31. */
  32. typedef struct sys_conf {
  33. uint sc_siumcr;
  34. uint sc_sypcr;
  35. char res1[6];
  36. ushort sc_swsr;
  37. uint sc_sipend;
  38. uint sc_simask;
  39. uint sc_siel;
  40. uint sc_sivec;
  41. uint sc_tesr;
  42. uint sc_sgpiodt1;
  43. uint sc_sgpiodt2;
  44. uint sc_sgpiocr;
  45. uint sc_emcr;
  46. uint sc_res1aa;
  47. uint sc_res1ab;
  48. uint sc_pdmcr;
  49. char res3[192];
  50. } sysconf5xx_t;
  51. /* Memory Controller Registers.
  52. */
  53. typedef struct mem_ctlr {
  54. uint memc_br0;
  55. uint memc_or0;
  56. uint memc_br1;
  57. uint memc_or1;
  58. uint memc_br2;
  59. uint memc_or2;
  60. uint memc_br3;
  61. uint memc_or3;
  62. char res1[32];
  63. uint memc_dmbr;
  64. uint memc_dmor;
  65. char res2[48];
  66. ushort memc_mstat;
  67. ushort memc_res4a;
  68. char res3[132];
  69. } memctl5xx_t;
  70. /* System Integration Timers.
  71. */
  72. typedef struct sys_int_timers {
  73. ushort sit_tbscr;
  74. char res1[2];
  75. uint sit_tbref0;
  76. uint sit_tbref1;
  77. char res2[20];
  78. ushort sit_rtcsc;
  79. char res3[2];
  80. uint sit_rtc;
  81. uint sit_rtsec;
  82. uint sit_rtcal;
  83. char res4[16];
  84. ushort sit_piscr;
  85. char res5[2];
  86. uint sit_pitc;
  87. uint sit_pitr;
  88. char res6[52];
  89. } sit5xx_t;
  90. /* Clocks and Reset
  91. */
  92. typedef struct clk_and_reset {
  93. uint car_sccr;
  94. uint car_plprcr;
  95. ushort car_rsr;
  96. ushort car_res7a;
  97. ushort car_colir;
  98. ushort car_res7b;
  99. ushort car_vsrmcr;
  100. ushort car_res7c;
  101. char res1[108];
  102. } car5xx_t;
  103. #define TBSCR_TBE ((ushort)0x0001)
  104. /* System Integration Timer Keys
  105. */
  106. typedef struct sitk {
  107. uint sitk_tbscrk;
  108. uint sitk_tbref0k;
  109. uint sitk_tbref1k;
  110. uint sitk_tbk;
  111. char res1[16];
  112. uint sitk_rtcsck;
  113. uint sitk_rtck;
  114. uint sitk_rtseck;
  115. uint sitk_rtcalk;
  116. char res2[16];
  117. uint sitk_piscrk;
  118. uint sitk_pitck;
  119. char res3[56];
  120. } sitk5xx_t;
  121. /* Clocks and Reset Keys.
  122. */
  123. typedef struct cark {
  124. uint cark_sccrk;
  125. uint cark_plprcrk;
  126. uint cark_rsrk;
  127. char res1[1140];
  128. } cark8xx_t;
  129. /* The key to unlock registers maintained by keep-alive power.
  130. */
  131. #define KAPWR_KEY ((unsigned int)0x55ccaa33)
  132. /* Flash Configuration
  133. */
  134. typedef struct fl {
  135. uint fl_cmfmcr;
  136. uint fl_cmftst;
  137. uint fl_cmfctl;
  138. char res1[52];
  139. } fl5xx_t;
  140. /* Dpram Control
  141. */
  142. typedef struct dprc {
  143. ushort dprc_dptmcr;
  144. ushort dprc_ramtst;
  145. ushort dprc_rambar;
  146. ushort dprc_misrh;
  147. ushort dprc_misrl;
  148. ushort dprc_miscnt;
  149. } dprc5xx_t;
  150. /* Time Processor Unit
  151. */
  152. typedef struct tpu {
  153. ushort tpu_tpumcr;
  154. ushort tpu_tcr;
  155. ushort tpu_dscr;
  156. ushort tpu_dssr;
  157. ushort tpu_ticr;
  158. ushort tpu_cier;
  159. ushort tpu_cfsr0;
  160. ushort tpu_cfsr1;
  161. ushort tpu_cfsr2;
  162. ushort tpu_cfsr3;
  163. ushort tpu_hsqr0;
  164. ushort tpu_hsqr1;
  165. ushort tpu_hsrr0;
  166. ushort tpu_hsrr1;
  167. ushort tpu_cpr0;
  168. ushort tpu_cpr1;
  169. ushort tpu_cisr;
  170. ushort tpu_lr;
  171. ushort tpu_sglr;
  172. ushort tpu_dcnr;
  173. ushort tpu_tpumcr2;
  174. ushort tpu_tpumcr3;
  175. ushort tpu_isdr;
  176. ushort tpu_iscr;
  177. char res1[208];
  178. char tpu[16][16];
  179. char res2[512];
  180. } tpu5xx_t;
  181. /* QADC
  182. */
  183. typedef struct qadc {
  184. ushort qadc_64mcr;
  185. ushort qadc_64test;
  186. ushort qadc_64int;
  187. u_char qadc_portqa;
  188. u_char qadc_portqb;
  189. ushort qadc_ddrqa;
  190. ushort qadc_qacr0;
  191. ushort qadc_qacr1;
  192. ushort qadc_qacr2;
  193. ushort qadc_qasr0;
  194. ushort qadc_qasr1;
  195. char res1[492];
  196. /* command convertion word table */
  197. ushort qadc_ccw[64];
  198. /* result word table, unsigned right justified */
  199. ushort qadc_rjurr[64];
  200. /* result word table, signed left justified */
  201. ushort qadc_ljsrr[64];
  202. /* result word table, unsigned left justified */
  203. ushort qadc_ljurr[64];
  204. } qadc5xx_t;
  205. /* QSMCM
  206. */
  207. typedef struct qsmcm {
  208. ushort qsmcm_qsmcr;
  209. ushort qsmcm_qtest;
  210. ushort qsmcm_qdsci_il;
  211. ushort qsmcm_qspi_il;
  212. ushort qsmcm_scc1r0;
  213. ushort qsmcm_scc1r1;
  214. ushort qsmcm_sc1sr;
  215. ushort qsmcm_sc1dr;
  216. char res1[2];
  217. char res2[2];
  218. ushort qsmcm_portqs;
  219. u_char qsmcm_pqspar;
  220. u_char qsmcm_ddrqs;
  221. ushort qsmcm_spcr0;
  222. ushort qsmcm_spcr1;
  223. ushort qsmcm_spcr2;
  224. u_char qsmcm_spcr3;
  225. u_char qsmcm_spsr;
  226. ushort qsmcm_scc2r0;
  227. ushort qsmcm_scc2r1;
  228. ushort qsmcm_sc2sr;
  229. ushort qsmcm_sc2dr;
  230. ushort qsmcm_qsci1cr;
  231. ushort qsmcm_qsci1sr;
  232. ushort qsmcm_sctq[16];
  233. ushort qsmcm_scrq[16];
  234. char res3[212];
  235. ushort qsmcm_recram[32];
  236. ushort qsmcm_tranram[32];
  237. u_char qsmcm_comdram[32];
  238. char res[3616];
  239. } qsmcm5xx_t;
  240. /* MIOS
  241. */
  242. typedef struct mios {
  243. ushort mios_mpwmsm0perr; /* mpwmsm0 */
  244. ushort mios_mpwmsm0pulr;
  245. ushort mios_mpwmsm0cntr;
  246. ushort mios_mpwmsm0scr;
  247. ushort mios_mpwmsm1perr; /* mpwmsm1 */
  248. ushort mios_mpwmsm1pulr;
  249. ushort mios_mpwmsm1cntr;
  250. ushort mios_mpwmsm1scr;
  251. ushort mios_mpwmsm2perr; /* mpwmsm2 */
  252. ushort mios_mpwmsm2pulr;
  253. ushort mios_mpwmsm2cntr;
  254. ushort mios_mpwmsm2scr;
  255. ushort mios_mpwmsm3perr; /* mpwmsm3 */
  256. ushort mios_mpwmsm3pulr;
  257. ushort mios_mpwmsm3cntr;
  258. ushort mios_mpwmsm3scr;
  259. char res1[16];
  260. ushort mios_mmcsm6cnt; /* mmcsm6 */
  261. ushort mios_mmcsm6mlr;
  262. ushort mios_mmcsm6scrd, mmcsm6scr;
  263. char res2[32];
  264. ushort mios_mdasm11ar; /* mdasm11 */
  265. ushort mios_mdasm11br;
  266. ushort mios_mdasm11scrd, mdasm11scr;
  267. ushort mios_mdasm12ar; /* mdasm12 */
  268. ushort mios_mdasm12br;
  269. ushort mios_mdasm12scrd, mdasm12scr;
  270. ushort mios_mdasm13ar; /* mdasm13 */
  271. ushort mios_mdasm13br;
  272. ushort mios_mdasm13scrd, mdasm13scr;
  273. ushort mios_mdasm14ar; /* mdasm14 */
  274. ushort mios_mdasm14br;
  275. ushort mios_mdasm14scrd, mdasm14scr;
  276. ushort mios_mdasm15ar; /* mdasm15 */
  277. ushort mios_mdasm15br;
  278. ushort mios_mdasm15scrd, mdasm15scr;
  279. ushort mios_mpwmsm16perr; /* mpwmsm16 */
  280. ushort mios_mpwmsm16pulr;
  281. ushort mios_mpwmsm16cntr;
  282. ushort mios_mpwmsm16scr;
  283. ushort mios_mpwmsm17perr; /* mpwmsm17 */
  284. ushort mios_mpwmsm17pulr;
  285. ushort mios_mpwmsm17cntr;
  286. ushort mios_mpwmsm17scr;
  287. ushort mios_mpwmsm18perr; /* mpwmsm18 */
  288. ushort mios_mpwmsm18pulr;
  289. ushort mios_mpwmsm18cntr;
  290. ushort mios_mpwmsm18scr;
  291. ushort mios_mpwmsm19perr; /* mpwmsm19 */
  292. ushort mios_mpwmsm19pulr;
  293. ushort mios_mpwmsm19cntr;
  294. ushort mios_mpwmsm19scr;
  295. char res3[16];
  296. ushort mios_mmcsm22cnt; /* mmcsm22 */
  297. ushort mios_mmcsm22mlr;
  298. ushort mios_mmcsm22scrd, mmcsm22scr;
  299. char res4[32];
  300. ushort mios_mdasm27ar; /* mdasm27 */
  301. ushort mios_mdasm27br;
  302. ushort mios_mdasm27scrd, mdasm27scr;
  303. ushort mios_mdasm28ar; /*mdasm28 */
  304. ushort mios_mdasm28br;
  305. ushort mios_mdasm28scrd, mdasm28scr;
  306. ushort mios_mdasm29ar; /* mdasm29 */
  307. ushort mios_mdasm29br;
  308. ushort mios_mdasm29scrd, mdasm29scr;
  309. ushort mios_mdasm30ar; /* mdasm30 */
  310. ushort mios_mdasm30br;
  311. ushort mios_mdasm30scrd, mdasm30scr;
  312. ushort mios_mdasm31ar; /* mdasm31 */
  313. ushort mios_mdasm31br;
  314. ushort mios_mdasm31scrd, mdasm31scr;
  315. ushort mios_mpiosm32dr;
  316. ushort mios_mpiosm32ddr;
  317. char res5[1788];
  318. ushort mios_mios1tpcr;
  319. char mios_res13[2];
  320. ushort mios_mios1vnr;
  321. ushort mios_mios1mcr;
  322. char res6[12];
  323. ushort mios_res42z;
  324. ushort mios_mcpsmscr;
  325. char res7[1000];
  326. ushort mios_mios1sr0;
  327. char res12[2];
  328. ushort mios_mios1er0;
  329. ushort mios_mios1rpr0;
  330. char res8[40];
  331. ushort mios_mios1lvl0;
  332. char res9[14];
  333. ushort mios_mios1sr1;
  334. char res10[2];
  335. ushort mios_mios1er1;
  336. ushort mios_mios1rpr1;
  337. char res11[40];
  338. ushort mios_mios1lvl1;
  339. char res13[1038];
  340. } mios5xx_t;
  341. /* Toucan Module
  342. */
  343. typedef struct tcan {
  344. ushort tcan_tcnmcr;
  345. ushort tcan_cantcr;
  346. ushort tcan_canicr;
  347. u_char tcan_canctrl0;
  348. u_char tcan_canctrl1;
  349. u_char tcan_presdiv;
  350. u_char tcan_canctrl2;
  351. ushort tcan_timer;
  352. char res1[4];
  353. ushort tcan_rxgmskhi;
  354. ushort tcan_rxgmsklo;
  355. ushort tcan_rx14mskhi;
  356. ushort tcan_rx14msklo;
  357. ushort tcan_rx15mskhi;
  358. ushort tcan_rx15msklo;
  359. char res2[4];
  360. ushort tcan_estat;
  361. ushort tcan_imask;
  362. ushort tcan_iflag;
  363. u_char tcan_rxectr;
  364. u_char tcan_txectr;
  365. char res3[88];
  366. struct {
  367. ushort scr;
  368. ushort id_high;
  369. ushort id_low;
  370. u_char data[8];
  371. char res4[2];
  372. } tcan_mbuff[16];
  373. char res5[640];
  374. } tcan5xx_t;
  375. /* UIMB
  376. */
  377. typedef struct uimb {
  378. uint uimb_umcr;
  379. char res1[12];
  380. uint uimb_utstcreg;
  381. char res2[12];
  382. uint uimb_uipend;
  383. } uimb5xx_t;
  384. /* Internal Memory Map MPC555
  385. */
  386. typedef struct immap {
  387. char res1[262144]; /* CMF Flash A 256 Kbytes */
  388. char res2[196608]; /* CMF Flash B 192 Kbytes */
  389. char res3[2670592]; /* Reserved for Flash */
  390. sysconf5xx_t im_siu_conf; /* SIU Configuration */
  391. memctl5xx_t im_memctl; /* Memory Controller */
  392. sit5xx_t im_sit; /* System Integration Timers */
  393. car5xx_t im_clkrst; /* Clocks and Reset */
  394. sitk5xx_t im_sitk; /* System Integration Timer Keys*/
  395. cark8xx_t im_clkrstk; /* Clocks and Resert Keys */
  396. fl5xx_t im_fla; /* Flash Module A */
  397. fl5xx_t im_flb; /* Flash Module B */
  398. char res4[14208]; /* Reserved for SIU */
  399. dprc5xx_t im_dprc; /* Dpram Control Register */
  400. char res5[8180]; /* Reserved */
  401. char dptram[6144]; /* Dptram */
  402. char res6[2048]; /* Reserved */
  403. tpu5xx_t im_tpua; /* Time Proessing Unit A */
  404. tpu5xx_t im_tpub; /* Time Processing Unit B */
  405. qadc5xx_t im_qadca; /* QADC A */
  406. qadc5xx_t im_qadcb; /* QADC B */
  407. qsmcm5xx_t im_qsmcm; /* SCI and SPI */
  408. mios5xx_t im_mios; /* MIOS */
  409. tcan5xx_t im_tcana; /* Toucan A */
  410. tcan5xx_t im_tcanb; /* Toucan B */
  411. char res7[1792]; /* Reserved */
  412. uimb5xx_t im_uimb; /* UIMB */
  413. } immap_t;
  414. #endif /* __IMMAP_5XX__ */