immap_8260.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  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. uint memc_pcibr0;
  89. uint memc_pcibr1;
  90. char res10[16];
  91. uint memc_pcimsk0;
  92. uint memc_pcimsk1;
  93. char res11[52];
  94. } memctl8260_t;
  95. /* System Integration Timers.
  96. */
  97. typedef struct sys_int_timers {
  98. char res1[32];
  99. ushort sit_tmcntsc;
  100. char res2[2];
  101. uint sit_tmcnt;
  102. char res3[4];
  103. uint sit_tmcntal;
  104. char res4[16];
  105. ushort sit_piscr;
  106. char res5[2];
  107. uint sit_pitc;
  108. uint sit_pitr;
  109. char res6[94];
  110. char res7[390];
  111. } sit8260_t;
  112. /* PCI
  113. */
  114. typedef struct pci_config {
  115. uint pci_omisr;
  116. uint pci_ominr;
  117. char res1[8];
  118. uint pci_ifqpr;
  119. uint pci_ofqpr;
  120. char res2[8];
  121. uint pci_imr0;
  122. uint pci_imr1;
  123. uint pci_omr0;
  124. uint pci_omr1;
  125. uint pci_odr;
  126. char res3[4];
  127. uint pci_idr;
  128. char res4[20];
  129. uint pci_imisr;
  130. uint pci_imimr;
  131. char res5[24];
  132. uint pci_ifhpr;
  133. char res5_2[4];
  134. uint pci_iftpr;
  135. char res6[4];
  136. uint pci_iphpr;
  137. char res6_2[4];
  138. uint pci_iptpr;
  139. char res7[4];
  140. uint pci_ofhpr;
  141. char res7_2[4];
  142. uint pci_oftpr;
  143. char res8[4];
  144. uint pci_ophpr;
  145. char res8_2[4];
  146. uint pci_optpr;
  147. char res9[8];
  148. uint pci_mucr;
  149. char res10[8];
  150. uint pci_qbar;
  151. char res11[12];
  152. uint pci_dmamr0;
  153. uint pci_dmasr0;
  154. uint pci_dmacdar0;
  155. char res12[4];
  156. uint pci_dmasar0;
  157. char res13[4];
  158. uint pci_dmadar0;
  159. char res14[4];
  160. uint pci_dmabcr0;
  161. uint pci_dmandar0;
  162. char res15[88];
  163. uint pci_dmamr1;
  164. uint pci_dmasr1;
  165. uint pci_dmacdar1;
  166. char res16[4];
  167. uint pci_dmasar1;
  168. char res17[4];
  169. uint pci_dmadar1;
  170. char res18[4];
  171. uint pci_dmabcr1;
  172. uint pci_dmandar1;
  173. char res19[88];
  174. uint pci_dmamr2;
  175. uint pci_dmasr2;
  176. uint pci_dmacdar2;
  177. char res20[4];
  178. uint pci_dmasar2;
  179. char res21[4];
  180. uint pci_dmadar2;
  181. char res22[4];
  182. uint pci_dmabcr2;
  183. uint pci_dmandar2;
  184. char res23[88];
  185. uint pci_dmamr3;
  186. uint pci_dmasr3;
  187. uint pci_dmacdar3;
  188. char res24[4];
  189. uint pci_dmasar3;
  190. char res25[4];
  191. uint pci_dmadar3;
  192. char res26[4];
  193. uint pci_dmabcr3;
  194. uint pci_dmandar3;
  195. char res27[344];
  196. uint pci_potar0;
  197. char res28[4];
  198. uint pci_pobar0;
  199. char res29[4];
  200. uint pci_pocmr0;
  201. char res30[4];
  202. uint pci_potar1;
  203. char res31[4];
  204. uint pci_pobar1;
  205. char res32[4];
  206. uint pci_pocmr1;
  207. char res33[4];
  208. uint pci_potar2;
  209. char res34[4];
  210. uint pci_pobar2;
  211. char res35[4];
  212. uint pci_pocmr2;
  213. char res36[52];
  214. uint pci_ptcr;
  215. uint pci_gpcr;
  216. uint pci_gcr;
  217. uint pci_esr;
  218. uint pci_emr;
  219. uint pci_ecr;
  220. uint pci_eacr;
  221. char res37[4];
  222. uint pci_edcr;
  223. char res38[4];
  224. uint pci_eccr;
  225. char res39[44];
  226. uint pci_pitar1;
  227. char res40[4];
  228. uint pci_pibar1;
  229. char res41[4];
  230. uint pci_picmr1;
  231. char res42[4];
  232. uint pci_pitar0;
  233. char res43[4];
  234. uint pci_pibar0;
  235. char res44[4];
  236. uint pci_picmr0;
  237. char res45[4];
  238. uint pci_cfg_addr;
  239. uint pci_cfg_data;
  240. uint pci_int_ack;
  241. char res46[756];
  242. }pci8260_t;
  243. #define PISCR_PIRQ_MASK ((ushort)0xff00)
  244. #define PISCR_PS ((ushort)0x0080)
  245. #define PISCR_PIE ((ushort)0x0004)
  246. #define PISCR_PTF ((ushort)0x0002)
  247. #define PISCR_PTE ((ushort)0x0001)
  248. /* Interrupt Controller.
  249. */
  250. typedef struct interrupt_controller {
  251. ushort ic_sicr;
  252. char res1[2];
  253. uint ic_sivec;
  254. uint ic_sipnrh;
  255. uint ic_sipnrl;
  256. uint ic_siprr;
  257. uint ic_scprrh;
  258. uint ic_scprrl;
  259. uint ic_simrh;
  260. uint ic_simrl;
  261. uint ic_siexr;
  262. char res2[88];
  263. } intctl8260_t;
  264. /* Clocks and Reset.
  265. */
  266. typedef struct clk_and_reset {
  267. uint car_sccr;
  268. char res1[4];
  269. uint car_scmr;
  270. char res2[4];
  271. uint car_rsr;
  272. uint car_rmr;
  273. char res[104];
  274. } car8260_t;
  275. /* Input/Output Port control/status registers.
  276. * Names consistent with processor manual, although they are different
  277. * from the original 8xx names.......
  278. */
  279. typedef struct io_port {
  280. uint iop_pdira;
  281. uint iop_ppara;
  282. uint iop_psora;
  283. uint iop_podra;
  284. uint iop_pdata;
  285. char res1[12];
  286. uint iop_pdirb;
  287. uint iop_pparb;
  288. uint iop_psorb;
  289. uint iop_podrb;
  290. uint iop_pdatb;
  291. char res2[12];
  292. uint iop_pdirc;
  293. uint iop_pparc;
  294. uint iop_psorc;
  295. uint iop_podrc;
  296. uint iop_pdatc;
  297. char res3[12];
  298. uint iop_pdird;
  299. uint iop_ppard;
  300. uint iop_psord;
  301. uint iop_podrd;
  302. uint iop_pdatd;
  303. char res4[12];
  304. } iop8260_t;
  305. /* Communication Processor Module Timers
  306. */
  307. typedef struct cpm_timers {
  308. u_char cpmt_tgcr1;
  309. char res1[3];
  310. u_char cpmt_tgcr2;
  311. char res2[11];
  312. ushort cpmt_tmr1;
  313. ushort cpmt_tmr2;
  314. ushort cpmt_trr1;
  315. ushort cpmt_trr2;
  316. ushort cpmt_tcr1;
  317. ushort cpmt_tcr2;
  318. ushort cpmt_tcn1;
  319. ushort cpmt_tcn2;
  320. ushort cpmt_tmr3;
  321. ushort cpmt_tmr4;
  322. ushort cpmt_trr3;
  323. ushort cpmt_trr4;
  324. ushort cpmt_tcr3;
  325. ushort cpmt_tcr4;
  326. ushort cpmt_tcn3;
  327. ushort cpmt_tcn4;
  328. ushort cpmt_ter1;
  329. ushort cpmt_ter2;
  330. ushort cpmt_ter3;
  331. ushort cpmt_ter4;
  332. char res3[584];
  333. } cpmtimer8260_t;
  334. /* DMA control/status registers.
  335. */
  336. typedef struct sdma_csr {
  337. char res0[24];
  338. u_char sdma_sdsr;
  339. char res1[3];
  340. u_char sdma_sdmr;
  341. char res2[3];
  342. u_char sdma_idsr1;
  343. char res3[3];
  344. u_char sdma_idmr1;
  345. char res4[3];
  346. u_char sdma_idsr2;
  347. char res5[3];
  348. u_char sdma_idmr2;
  349. char res6[3];
  350. u_char sdma_idsr3;
  351. char res7[3];
  352. u_char sdma_idmr3;
  353. char res8[3];
  354. u_char sdma_idsr4;
  355. char res9[3];
  356. u_char sdma_idmr4;
  357. char res10[707];
  358. } sdma8260_t;
  359. /* Fast controllers
  360. */
  361. typedef struct fcc {
  362. uint fcc_gfmr;
  363. uint fcc_fpsmr;
  364. ushort fcc_ftodr;
  365. char res1[2];
  366. ushort fcc_fdsr;
  367. char res2[2];
  368. ushort fcc_fcce;
  369. char res3[2];
  370. ushort fcc_fccm;
  371. char res4[2];
  372. u_char fcc_fccs;
  373. char res5[3];
  374. u_char fcc_ftirr_phy[4];
  375. } fcc_t;
  376. /* Fast controllers continued
  377. */
  378. typedef struct fcc_c {
  379. uint fcc_firper;
  380. uint fcc_firer;
  381. uint fcc_firsr_hi;
  382. uint fcc_firsr_lo;
  383. u_char fcc_gfemr;
  384. char res1[15];
  385. } fcc_c_t;
  386. /* TC Layer
  387. */
  388. typedef struct tclayer {
  389. ushort tc_tcmode;
  390. ushort tc_cdsmr;
  391. ushort tc_tcer;
  392. ushort tc_rcc;
  393. ushort tc_tcmr;
  394. ushort tc_fcc;
  395. ushort tc_ccc;
  396. ushort tc_icc;
  397. ushort tc_tcc;
  398. ushort tc_ecc;
  399. char res1[12];
  400. } tclayer_t;
  401. /* I2C
  402. */
  403. typedef struct i2c {
  404. u_char i2c_i2mod;
  405. char res1[3];
  406. u_char i2c_i2add;
  407. char res2[3];
  408. u_char i2c_i2brg;
  409. char res3[3];
  410. u_char i2c_i2com;
  411. char res4[3];
  412. u_char i2c_i2cer;
  413. char res5[3];
  414. u_char i2c_i2cmr;
  415. char res6[331];
  416. } i2c8260_t;
  417. typedef struct scc { /* Serial communication channels */
  418. uint scc_gsmrl;
  419. uint scc_gsmrh;
  420. ushort scc_psmr;
  421. char res1[2];
  422. ushort scc_todr;
  423. ushort scc_dsr;
  424. ushort scc_scce;
  425. char res2[2];
  426. ushort scc_sccm;
  427. char res3;
  428. u_char scc_sccs;
  429. char res4[8];
  430. } scc_t;
  431. typedef struct smc { /* Serial management channels */
  432. char res1[2];
  433. ushort smc_smcmr;
  434. char res2[2];
  435. u_char smc_smce;
  436. char res3[3];
  437. u_char smc_smcm;
  438. char res4[5];
  439. } smc_t;
  440. /* Serial Peripheral Interface.
  441. */
  442. typedef struct im_spi {
  443. ushort spi_spmode;
  444. char res1[4];
  445. u_char spi_spie;
  446. char res2[3];
  447. u_char spi_spim;
  448. char res3[2];
  449. u_char spi_spcom;
  450. char res4[82];
  451. } im_spi_t;
  452. /* CPM Mux.
  453. */
  454. typedef struct cpmux {
  455. u_char cmx_si1cr;
  456. char res1;
  457. u_char cmx_si2cr;
  458. char res2;
  459. uint cmx_fcr;
  460. uint cmx_scr;
  461. u_char cmx_smr;
  462. char res3;
  463. ushort cmx_uar;
  464. char res4[16];
  465. } cpmux_t;
  466. /* SIRAM control
  467. */
  468. typedef struct siram {
  469. ushort si_amr;
  470. ushort si_bmr;
  471. ushort si_cmr;
  472. ushort si_dmr;
  473. u_char si_gmr;
  474. char res1;
  475. u_char si_cmdr;
  476. char res2;
  477. u_char si_str;
  478. char res3;
  479. ushort si_rsr;
  480. } siramctl_t;
  481. typedef struct mcc {
  482. ushort mcc_mcce;
  483. char res1[2];
  484. ushort mcc_mccm;
  485. char res2[2];
  486. u_char mcc_mccf;
  487. char res3[7];
  488. } mcc_t;
  489. typedef struct comm_proc {
  490. uint cp_cpcr;
  491. uint cp_rccr;
  492. char res1[14];
  493. ushort cp_rter;
  494. char res2[2];
  495. ushort cp_rtmr;
  496. ushort cp_rtscr;
  497. char res3[2];
  498. uint cp_rtsr;
  499. char res4[12];
  500. } cpm8260_t;
  501. /* ...and the whole thing wrapped up....
  502. */
  503. typedef struct immap {
  504. /* Some references are into the unique and known dpram spaces,
  505. * others are from the generic base.
  506. */
  507. #define im_dprambase im_dpram1
  508. u_char im_dpram1[16*1024];
  509. char res1[16*1024];
  510. u_char im_dpram2[4*1024];
  511. char res2[8*1024];
  512. u_char im_dpram3[4*1024];
  513. char res3[16*1024];
  514. sysconf8260_t im_siu_conf; /* SIU Configuration */
  515. memctl8260_t im_memctl; /* Memory Controller */
  516. sit8260_t im_sit; /* System Integration Timers */
  517. pci8260_t im_pci; /* PCI Configuration */
  518. intctl8260_t im_intctl; /* Interrupt Controller */
  519. car8260_t im_clkrst; /* Clocks and reset */
  520. iop8260_t im_ioport; /* IO Port control/status */
  521. cpmtimer8260_t im_cpmtimer; /* CPM timers */
  522. sdma8260_t im_sdma; /* SDMA control/status */
  523. fcc_t im_fcc[3]; /* Three FCCs */
  524. char res4[32];
  525. fcc_c_t im_fcc_c[3]; /* Continued FCCs */
  526. char res4a[32];
  527. tclayer_t im_tclayer[8]; /* Eight TCLayers */
  528. ushort tc_tcgsr;
  529. ushort tc_tcger;
  530. /* First set of baud rate generators.
  531. */
  532. char res4b[236];
  533. uint im_brgc5;
  534. uint im_brgc6;
  535. uint im_brgc7;
  536. uint im_brgc8;
  537. char res5[608];
  538. i2c8260_t im_i2c; /* I2C control/status */
  539. cpm8260_t im_cpm; /* Communication processor */
  540. /* Second set of baud rate generators.
  541. */
  542. uint im_brgc1;
  543. uint im_brgc2;
  544. uint im_brgc3;
  545. uint im_brgc4;
  546. scc_t im_scc[4]; /* Four SCCs */
  547. smc_t im_smc[2]; /* Couple of SMCs */
  548. im_spi_t im_spi; /* A SPI */
  549. cpmux_t im_cpmux; /* CPM clock route mux */
  550. siramctl_t im_siramctl1; /* First SI RAM Control */
  551. mcc_t im_mcc1; /* First MCC */
  552. siramctl_t im_siramctl2; /* Second SI RAM Control */
  553. mcc_t im_mcc2; /* Second MCC */
  554. char res6[1184];
  555. ushort im_si1txram[256];
  556. char res7[512];
  557. ushort im_si1rxram[256];
  558. char res8[512];
  559. ushort im_si2txram[256];
  560. char res9[512];
  561. ushort im_si2rxram[256];
  562. char res10[512];
  563. char res11[4096];
  564. } immap_t;
  565. #endif /* __IMMAP_82XX__ */