immap_8260.h
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:8k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

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