immap_8260.h 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. /*
  2. * MPC8260 Internal Memory Map
  3. * Copyright (c) 1999 Dan Malek (dmalek@jlc.net)
  4. *
  5. * The Internal Memory Map of the 8260. I don't know how generic
  6. * this will be, as I don't have any knowledge of the subsequent
  7. * parts at this time. I copied this from the 8xx_immap.h.
  8. */
  9. #ifndef __IMMAP_82XX__
  10. #define __IMMAP_82XX__
  11. /* System configuration registers.
  12. */
  13. typedef struct sys_conf {
  14. uint sc_siumcr;
  15. uint sc_sypcr;
  16. char res1[6];
  17. ushort sc_swsr;
  18. char res2[20];
  19. uint sc_bcr;
  20. u_char sc_ppc_acr;
  21. char res3[3];
  22. uint sc_ppc_alrh;
  23. uint sc_ppc_alrl;
  24. u_char sc_lcl_acr;
  25. char res4[3];
  26. uint sc_lcl_alrh;
  27. uint sc_lcl_alrl;
  28. uint sc_tescr1;
  29. uint sc_tescr2;
  30. uint sc_ltescr1;
  31. uint sc_ltescr2;
  32. uint sc_pdtea;
  33. u_char sc_pdtem;
  34. char res5[3];
  35. uint sc_ldtea;
  36. u_char sc_ldtem;
  37. char res6[163];
  38. } sysconf8260_t;
  39. /* Memory controller registers.
  40. */
  41. typedef struct mem_ctlr {
  42. uint memc_br0;
  43. uint memc_or0;
  44. uint memc_br1;
  45. uint memc_or1;
  46. uint memc_br2;
  47. uint memc_or2;
  48. uint memc_br3;
  49. uint memc_or3;
  50. uint memc_br4;
  51. uint memc_or4;
  52. uint memc_br5;
  53. uint memc_or5;
  54. uint memc_br6;
  55. uint memc_or6;
  56. uint memc_br7;
  57. uint memc_or7;
  58. uint memc_br8;
  59. uint memc_or8;
  60. uint memc_br9;
  61. uint memc_or9;
  62. uint memc_br10;
  63. uint memc_or10;
  64. uint memc_br11;
  65. uint memc_or11;
  66. char res1[8];
  67. uint memc_mar;
  68. char res2[4];
  69. uint memc_mamr;
  70. uint memc_mbmr;
  71. uint memc_mcmr;
  72. char res3[8];
  73. ushort memc_mptpr;
  74. char res4[2];
  75. uint memc_mdr;
  76. char res5[4];
  77. uint memc_psdmr;
  78. uint memc_lsdmr;
  79. u_char memc_purt;
  80. char res6[3];
  81. u_char memc_psrt;
  82. char res7[3];
  83. u_char memc_lurt;
  84. char res8[3];
  85. u_char memc_lsrt;
  86. char res9[3];
  87. uint memc_immr;
  88. char res10[84];
  89. } memctl8260_t;
  90. /* System Integration Timers.
  91. */
  92. typedef struct sys_int_timers {
  93. char res1[32];
  94. ushort sit_tmcntsc;
  95. char res2[2];
  96. uint sit_tmcnt;
  97. char res3[4];
  98. uint sit_tmcntal;
  99. char res4[16];
  100. ushort sit_piscr;
  101. char res5[2];
  102. uint sit_pitc;
  103. uint sit_pitr;
  104. char res6[94];
  105. char res7[2390];
  106. } sit8260_t;
  107. #define PISCR_PIRQ_MASK ((ushort)0xff00)
  108. #define PISCR_PS ((ushort)0x0080)
  109. #define PISCR_PIE ((ushort)0x0004)
  110. #define PISCR_PTF ((ushort)0x0002)
  111. #define PISCR_PTE ((ushort)0x0001)
  112. /* Interrupt Controller.
  113. */
  114. typedef struct interrupt_controller {
  115. ushort ic_sicr;
  116. char res1[2];
  117. uint ic_sivec;
  118. uint ic_sipnrh;
  119. uint ic_sipnrl;
  120. uint ic_siprr;
  121. uint ic_scprrh;
  122. uint ic_scprrl;
  123. uint ic_simrh;
  124. uint ic_simrl;
  125. uint ic_siexr;
  126. char res2[88];
  127. } intctl8260_t;
  128. /* Clocks and Reset.
  129. */
  130. typedef struct clk_and_reset {
  131. uint car_sccr;
  132. char res1[4];
  133. uint car_scmr;
  134. char res2[4];
  135. uint car_rsr;
  136. uint car_rmr;
  137. char res[104];
  138. } car8260_t;
  139. /* Input/Output Port control/status registers.
  140. * Names consistent with processor manual, although they are different
  141. * from the original 8xx names.......
  142. */
  143. typedef struct io_port {
  144. uint iop_pdira;
  145. uint iop_ppara;
  146. uint iop_psora;
  147. uint iop_podra;
  148. uint iop_pdata;
  149. char res1[12];
  150. uint iop_pdirb;
  151. uint iop_pparb;
  152. uint iop_psorb;
  153. uint iop_podrb;
  154. uint iop_pdatb;
  155. char res2[12];
  156. uint iop_pdirc;
  157. uint iop_pparc;
  158. uint iop_psorc;
  159. uint iop_podrc;
  160. uint iop_pdatc;
  161. char res3[12];
  162. uint iop_pdird;
  163. uint iop_ppard;
  164. uint iop_psord;
  165. uint iop_podrd;
  166. uint iop_pdatd;
  167. char res4[12];
  168. } iop8260_t;
  169. /* Communication Processor Module Timers
  170. */
  171. typedef struct cpm_timers {
  172. u_char cpmt_tgcr1;
  173. char res1[3];
  174. u_char cpmt_tgcr2;
  175. char res2[11];
  176. ushort cpmt_tmr1;
  177. ushort cpmt_tmr2;
  178. ushort cpmt_trr1;
  179. ushort cpmt_trr2;
  180. ushort cpmt_tcr1;
  181. ushort cpmt_tcr2;
  182. ushort cpmt_tcn1;
  183. ushort cpmt_tcn2;
  184. ushort cpmt_tmr3;
  185. ushort cpmt_tmr4;
  186. ushort cpmt_trr3;
  187. ushort cpmt_trr4;
  188. ushort cpmt_tcr3;
  189. ushort cpmt_tcr4;
  190. ushort cpmt_tcn3;
  191. ushort cpmt_tcn4;
  192. ushort cpmt_ter1;
  193. ushort cpmt_ter2;
  194. ushort cpmt_ter3;
  195. ushort cpmt_ter4;
  196. char res3[584];
  197. } cpmtimer8260_t;
  198. /* DMA control/status registers.
  199. */
  200. typedef struct sdma_csr {
  201. char res0[24];
  202. u_char sdma_sdsr;
  203. char res1[3];
  204. u_char sdma_sdmr;
  205. char res2[3];
  206. u_char sdma_idsr1;
  207. char res3[3];
  208. u_char sdma_idmr1;
  209. char res4[3];
  210. u_char sdma_idsr2;
  211. char res5[3];
  212. u_char sdma_idmr2;
  213. char res6[3];
  214. u_char sdma_idsr3;
  215. char res7[3];
  216. u_char sdma_idmr3;
  217. char res8[3];
  218. u_char sdma_idsr4;
  219. char res9[3];
  220. u_char sdma_idmr4;
  221. char res10[707];
  222. } sdma8260_t;
  223. /* Fast controllers
  224. */
  225. typedef struct fcc {
  226. uint fcc_gfmr;
  227. uint fcc_fpsmr;
  228. ushort fcc_ftodr;
  229. char res1[2];
  230. ushort fcc_fdsr;
  231. char res2[2];
  232. ushort fcc_fcce;
  233. char res3[2];
  234. ushort fcc_fccm;
  235. char res4[2];
  236. u_char fcc_fccs;
  237. char res5[3];
  238. u_char fcc_ftirr_phy[4];
  239. } fcc_t;
  240. /* I2C
  241. */
  242. typedef struct i2c {
  243. u_char i2c_i2mod;
  244. char res1[3];
  245. u_char i2c_i2add;
  246. char res2[3];
  247. u_char i2c_i2brg;
  248. char res3[3];
  249. u_char i2c_i2com;
  250. char res4[3];
  251. u_char i2c_i2cer;
  252. char res5[3];
  253. u_char i2c_i2cmr;
  254. char res6[331];
  255. } i2c8260_t;
  256. typedef struct scc { /* Serial communication channels */
  257. uint scc_gsmrl;
  258. uint scc_gsmrh;
  259. ushort scc_psmr;
  260. char res1[2];
  261. ushort scc_todr;
  262. ushort scc_dsr;
  263. ushort scc_scce;
  264. char res2[2];
  265. ushort scc_sccm;
  266. char res3;
  267. u_char scc_sccs;
  268. char res4[8];
  269. } scc_t;
  270. typedef struct smc { /* Serial management channels */
  271. char res1[2];
  272. ushort smc_smcmr;
  273. char res2[2];
  274. u_char smc_smce;
  275. char res3[3];
  276. u_char smc_smcm;
  277. char res4[5];
  278. } smc_t;
  279. /* Serial Peripheral Interface.
  280. */
  281. typedef struct im_spi {
  282. ushort spi_spmode;
  283. char res1[4];
  284. u_char spi_spie;
  285. char res2[3];
  286. u_char spi_spim;
  287. char res3[2];
  288. u_char spi_spcom;
  289. char res4[82];
  290. } im_spi_t;
  291. /* CPM Mux.
  292. */
  293. typedef struct cpmux {
  294. u_char cmx_si1cr;
  295. char res1;
  296. u_char cmx_si2cr;
  297. char res2;
  298. uint cmx_fcr;
  299. uint cmx_scr;
  300. u_char cmx_smr;
  301. char res3;
  302. ushort cmx_uar;
  303. char res4[16];
  304. } cpmux_t;
  305. /* SIRAM control
  306. */
  307. typedef struct siram {
  308. ushort si_amr;
  309. ushort si_bmr;
  310. ushort si_cmr;
  311. ushort si_dmr;
  312. u_char si_gmr;
  313. char res1;
  314. u_char si_cmdr;
  315. char res2;
  316. u_char si_str;
  317. char res3;
  318. ushort si_rsr;
  319. } siramctl_t;
  320. typedef struct mcc {
  321. ushort mcc_mcce;
  322. char res1[2];
  323. ushort mcc_mccm;
  324. char res2[2];
  325. u_char mcc_mccf;
  326. char res3[7];
  327. } mcc_t;
  328. typedef struct comm_proc {
  329. uint cp_cpcr;
  330. uint cp_rccr;
  331. char res1[14];
  332. ushort cp_rter;
  333. char res2[2];
  334. ushort cp_rtmr;
  335. ushort cp_rtscr;
  336. char res3[2];
  337. uint cp_rtsr;
  338. char res4[12];
  339. } cpm8260_t;
  340. /* ...and the whole thing wrapped up....
  341. */
  342. typedef struct immap {
  343. /* Some references are into the unique and known dpram spaces,
  344. * others are from the generic base.
  345. */
  346. #define im_dprambase im_dpram1
  347. u_char im_dpram1[16*1024];
  348. char res1[16*1024];
  349. u_char im_dpram2[4*1024];
  350. char res2[8*1024];
  351. u_char im_dpram3[4*1024];
  352. char res3[16*1024];
  353. sysconf8260_t im_siu_conf; /* SIU Configuration */
  354. memctl8260_t im_memctl; /* Memory Controller */
  355. sit8260_t im_sit; /* System Integration Timers */
  356. intctl8260_t im_intctl; /* Interrupt Controller */
  357. car8260_t im_clkrst; /* Clocks and reset */
  358. iop8260_t im_ioport; /* IO Port control/status */
  359. cpmtimer8260_t im_cpmtimer; /* CPM timers */
  360. sdma8260_t im_sdma; /* SDMA control/status */
  361. fcc_t im_fcc[3]; /* Three FCCs */
  362. char res4[159];
  363. /* First set of baud rate generators.
  364. */
  365. char res4a[496];
  366. uint im_brgc5;
  367. uint im_brgc6;
  368. uint im_brgc7;
  369. uint im_brgc8;
  370. char res5[608];
  371. i2c8260_t im_i2c; /* I2C control/status */
  372. cpm8260_t im_cpm; /* Communication processor */
  373. /* Second set of baud rate generators.
  374. */
  375. uint im_brgc1;
  376. uint im_brgc2;
  377. uint im_brgc3;
  378. uint im_brgc4;
  379. scc_t im_scc[4]; /* Four SCCs */
  380. smc_t im_smc[2]; /* Couple of SMCs */
  381. im_spi_t im_spi; /* A SPI */
  382. cpmux_t im_cpmux; /* CPM clock route mux */
  383. siramctl_t im_siramctl1; /* First SI RAM Control */
  384. mcc_t im_mcc1; /* First MCC */
  385. siramctl_t im_siramctl2; /* Second SI RAM Control */
  386. mcc_t im_mcc2; /* Second MCC */
  387. char res6[1184];
  388. ushort im_si1txram[256];
  389. char res7[512];
  390. ushort im_si1rxram[256];
  391. char res8[512];
  392. ushort im_si2txram[256];
  393. char res9[512];
  394. ushort im_si2rxram[256];
  395. char res10[512];
  396. char res11[4096];
  397. } immap_t;
  398. #endif /* __IMMAP_82XX__ */