blob: 407cf49956c91661990c8da4de13116cf2caebe4 [file] [log] [blame]
wdenk1f045212002-03-10 14:37:15 +00001/*
2 * MPC8260 Internal Memory Map
3 * Copyright (c) 1999 Dan Malek (dmalek@jlc.net)
4 *
wdenk56ed43e2004-02-22 23:46:08 +00005 * The Internal Memory Map of the 8260. I don't know how generic
wdenk1f045212002-03-10 14:37:15 +00006 * this will be, as I don't have any knowledge of the subsequent
wdenk56ed43e2004-02-22 23:46:08 +00007 * parts at this time. I copied this from the 8xx_immap.h.
wdenk1f045212002-03-10 14:37:15 +00008 */
9#ifndef __IMMAP_82XX__
10#define __IMMAP_82XX__
11
12/* System configuration registers.
13*/
wdenk56ed43e2004-02-22 23:46:08 +000014typedef struct sys_conf {
wdenk1f045212002-03-10 14:37:15 +000015 uint sc_siumcr;
16 uint sc_sypcr;
17 char res1[6];
18 ushort sc_swsr;
19 char res2[20];
20 uint sc_bcr;
21 u_char sc_ppc_acr;
22 char res3[3];
23 uint sc_ppc_alrh;
24 uint sc_ppc_alrl;
25 u_char sc_lcl_acr;
26 char res4[3];
27 uint sc_lcl_alrh;
28 uint sc_lcl_alrl;
29 uint sc_tescr1;
30 uint sc_tescr2;
31 uint sc_ltescr1;
32 uint sc_ltescr2;
33 uint sc_pdtea;
34 u_char sc_pdtem;
35 char res5[3];
36 uint sc_ldtea;
37 u_char sc_ldtem;
38 char res6[163];
39} sysconf8260_t;
40
41
42/* Memory controller registers.
43*/
44typedef struct mem_ctlr {
45 uint memc_br0;
46 uint memc_or0;
47 uint memc_br1;
48 uint memc_or1;
49 uint memc_br2;
50 uint memc_or2;
51 uint memc_br3;
52 uint memc_or3;
53 uint memc_br4;
54 uint memc_or4;
55 uint memc_br5;
56 uint memc_or5;
57 uint memc_br6;
58 uint memc_or6;
59 uint memc_br7;
60 uint memc_or7;
61 uint memc_br8;
62 uint memc_or8;
63 uint memc_br9;
64 uint memc_or9;
65 uint memc_br10;
66 uint memc_or10;
67 uint memc_br11;
68 uint memc_or11;
69 char res1[8];
70 uint memc_mar;
71 char res2[4];
72 uint memc_mamr;
73 uint memc_mbmr;
74 uint memc_mcmr;
75 char res3[8];
76 ushort memc_mptpr;
77 char res4[2];
78 uint memc_mdr;
79 char res5[4];
80 uint memc_psdmr;
81 uint memc_lsdmr;
82 u_char memc_purt;
83 char res6[3];
84 u_char memc_psrt;
85 char res7[3];
86 u_char memc_lurt;
87 char res8[3];
88 u_char memc_lsrt;
89 char res9[3];
90 uint memc_immr;
wdenk56ed43e2004-02-22 23:46:08 +000091 uint memc_pcibr0;
92 uint memc_pcibr1;
93 char res10[16];
94 uint memc_pcimsk0;
95 uint memc_pcimsk1;
96 char res11[52];
wdenk1f045212002-03-10 14:37:15 +000097} memctl8260_t;
98
99/* System Integration Timers.
100*/
101typedef struct sys_int_timers {
102 char res1[32];
103 ushort sit_tmcntsc;
104 char res2[2];
105 uint sit_tmcnt;
106 char res3[4];
107 uint sit_tmcntal;
108 char res4[16];
109 ushort sit_piscr;
110 char res5[2];
111 uint sit_pitc;
112 uint sit_pitr;
113 char res6[94];
wdenk56ed43e2004-02-22 23:46:08 +0000114 char res7[390];
wdenk1f045212002-03-10 14:37:15 +0000115} sit8260_t;
116
wdenk56ed43e2004-02-22 23:46:08 +0000117/* PCI
118 */
119typedef struct pci_config {
120 uint pci_omisr;
121 uint pci_ominr;
122 char res1[8];
123 uint pci_ifqpr;
124 uint pci_ofqpr;
125 char res2[8];
126 uint pci_imr0;
127 uint pci_imr1;
128 uint pci_omr0;
129 uint pci_omr1;
130 uint pci_odr;
131 char res3[4];
132 uint pci_idr;
133 char res4[20];
134 uint pci_imisr;
135 uint pci_imimr;
136 char res5[24];
137 uint pci_ifhpr;
138 uint pci_iftpr;
139 char res6[8];
140 uint pci_iphpr;
141 uint pci_iptpr;
142 char res7[8];
143 uint pci_ofhpr;
144 uint pci_oftpr;
145 char res8[8];
146 uint pci_ophpr;
147 uint pci_optpr;
148 char res9[12];
149 uint pci_mucr;
150 char res10[8];
151 uint pci_qbar;
152 char res11[12];
153 uint pci_dmamr0;
154 uint pci_dmasr0;
155 uint pci_dmacdar0;
156 char res12[4];
157 uint pci_dmasar0;
158 char res13[4];
159 uint pci_dmadar0;
160 char res14[4];
161 uint pci_dmabcr0;
162 uint pci_dmandar0;
163 char res15[88];
164 uint pci_dmamr1;
165 uint pci_dmasr1;
166 uint pci_dmacdar1;
167 char res16[4];
168 uint pci_dmasar1;
169 char res17[4];
170 uint pci_dmadar1;
171 char res18[4];
172 uint pci_dmabcr1;
173 uint pci_dmandar1;
174 char res19[88];
175 uint pci_dmamr2;
176 uint pci_dmasr2;
177 uint pci_dmacdar2;
178 char res20[4];
179 uint pci_dmasar2;
180 char res21[4];
181 uint pci_dmadar2;
182 char res22[4];
183 uint pci_dmabcr2;
184 uint pci_dmandar2;
185 char res23[88];
186 uint pci_dmamr3;
187 uint pci_dmasr3;
188 uint pci_dmacdar3;
189 char res24[4];
190 uint pci_dmasar3;
191 char res25[4];
192 uint pci_dmadar3;
193 char res26[4];
194 uint pci_dmabcr3;
195 uint pci_dmandar3;
196 char res27[344];
197 uint pci_potar0;
198 char res28[4];
199 uint pci_pobar0;
200 char res29[4];
201 uint pci_pocmr0;
202 char res30[4];
203 uint pci_potar1;
204 char res31[4];
205 uint pci_pobar1;
206 char res32[4];
207 uint pci_pocmr1;
208 char res33[4];
209 uint pci_potar2;
210 char res34[4];
211 uint pci_pobar2;
212 char res35[4];
213 uint pci_pocmr2;
214 char res36[52];
215 uint pci_ptcr;
216 uint pci_gpcr;
217 uint pci_gcr;
218 uint pci_esr;
219 uint pci_emr;
220 uint pci_ecr;
221 uint pci_eacr;
222 char res37[4];
223 uint pci_edcr;
224 char res38[4];
225 uint pci_eccr;
226 char res39[44];
227 uint pci_pitar1;
228 char res40[4];
229 uint pci_pibar1;
230 char res41[4];
231 uint pci_picmr1;
232 char res42[4];
233 uint pci_pitar0;
234 char res43[4];
235 uint pci_pibar0;
236 char res44[4];
237 uint pci_picmr0;
238 char res45[4];
239 uint pci_cfg_addr;
240 uint pci_cfg_data;
241 uint pci_int_ack;
242 char res46[756];
243}pci8260_t;
wdenk1f045212002-03-10 14:37:15 +0000244#define PISCR_PIRQ_MASK ((ushort)0xff00)
245#define PISCR_PS ((ushort)0x0080)
246#define PISCR_PIE ((ushort)0x0004)
247#define PISCR_PTF ((ushort)0x0002)
248#define PISCR_PTE ((ushort)0x0001)
249
250/* Interrupt Controller.
251*/
252typedef struct interrupt_controller {
253 ushort ic_sicr;
254 char res1[2];
255 uint ic_sivec;
256 uint ic_sipnrh;
257 uint ic_sipnrl;
258 uint ic_siprr;
259 uint ic_scprrh;
260 uint ic_scprrl;
261 uint ic_simrh;
262 uint ic_simrl;
263 uint ic_siexr;
264 char res2[88];
265} intctl8260_t;
266
267/* Clocks and Reset.
268*/
269typedef struct clk_and_reset {
270 uint car_sccr;
271 char res1[4];
272 uint car_scmr;
273 char res2[4];
274 uint car_rsr;
275 uint car_rmr;
276 char res[104];
277} car8260_t;
278
279/* Input/Output Port control/status registers.
280 * Names consistent with processor manual, although they are different
281 * from the original 8xx names.......
282 */
283typedef struct io_port {
284 uint iop_pdira;
285 uint iop_ppara;
286 uint iop_psora;
287 uint iop_podra;
288 uint iop_pdata;
289 char res1[12];
290 uint iop_pdirb;
291 uint iop_pparb;
292 uint iop_psorb;
293 uint iop_podrb;
294 uint iop_pdatb;
295 char res2[12];
296 uint iop_pdirc;
297 uint iop_pparc;
298 uint iop_psorc;
299 uint iop_podrc;
300 uint iop_pdatc;
301 char res3[12];
302 uint iop_pdird;
303 uint iop_ppard;
304 uint iop_psord;
305 uint iop_podrd;
306 uint iop_pdatd;
307 char res4[12];
308} iop8260_t;
309
310/* Communication Processor Module Timers
311*/
312typedef struct cpm_timers {
313 u_char cpmt_tgcr1;
314 char res1[3];
315 u_char cpmt_tgcr2;
316 char res2[11];
317 ushort cpmt_tmr1;
318 ushort cpmt_tmr2;
319 ushort cpmt_trr1;
320 ushort cpmt_trr2;
321 ushort cpmt_tcr1;
322 ushort cpmt_tcr2;
323 ushort cpmt_tcn1;
324 ushort cpmt_tcn2;
325 ushort cpmt_tmr3;
326 ushort cpmt_tmr4;
327 ushort cpmt_trr3;
328 ushort cpmt_trr4;
329 ushort cpmt_tcr3;
330 ushort cpmt_tcr4;
331 ushort cpmt_tcn3;
332 ushort cpmt_tcn4;
333 ushort cpmt_ter1;
334 ushort cpmt_ter2;
335 ushort cpmt_ter3;
336 ushort cpmt_ter4;
337 char res3[584];
338} cpmtimer8260_t;
339
340/* DMA control/status registers.
341*/
342typedef struct sdma_csr {
343 char res0[24];
344 u_char sdma_sdsr;
345 char res1[3];
346 u_char sdma_sdmr;
347 char res2[3];
348 u_char sdma_idsr1;
349 char res3[3];
350 u_char sdma_idmr1;
351 char res4[3];
352 u_char sdma_idsr2;
353 char res5[3];
354 u_char sdma_idmr2;
355 char res6[3];
356 u_char sdma_idsr3;
357 char res7[3];
358 u_char sdma_idmr3;
359 char res8[3];
360 u_char sdma_idsr4;
361 char res9[3];
362 u_char sdma_idmr4;
363 char res10[707];
364} sdma8260_t;
365
366/* Fast controllers
367*/
368typedef struct fcc {
369 uint fcc_gfmr;
370 uint fcc_fpsmr;
371 ushort fcc_ftodr;
372 char res1[2];
373 ushort fcc_fdsr;
374 char res2[2];
375 ushort fcc_fcce;
376 char res3[2];
377 ushort fcc_fccm;
378 char res4[2];
379 u_char fcc_fccs;
380 char res5[3];
381 u_char fcc_ftirr_phy[4];
382} fcc_t;
383
384/* I2C
385*/
386typedef struct i2c {
387 u_char i2c_i2mod;
388 char res1[3];
389 u_char i2c_i2add;
390 char res2[3];
391 u_char i2c_i2brg;
392 char res3[3];
393 u_char i2c_i2com;
394 char res4[3];
395 u_char i2c_i2cer;
396 char res5[3];
397 u_char i2c_i2cmr;
398 char res6[331];
399} i2c8260_t;
400
401typedef struct scc { /* Serial communication channels */
402 uint scc_gsmrl;
403 uint scc_gsmrh;
404 ushort scc_psmr;
405 char res1[2];
406 ushort scc_todr;
407 ushort scc_dsr;
408 ushort scc_scce;
409 char res2[2];
410 ushort scc_sccm;
411 char res3;
412 u_char scc_sccs;
413 char res4[8];
414} scc_t;
415
416typedef struct smc { /* Serial management channels */
417 char res1[2];
418 ushort smc_smcmr;
419 char res2[2];
420 u_char smc_smce;
421 char res3[3];
422 u_char smc_smcm;
423 char res4[5];
424} smc_t;
425
426/* Serial Peripheral Interface.
427*/
428typedef struct im_spi {
429 ushort spi_spmode;
430 char res1[4];
431 u_char spi_spie;
432 char res2[3];
433 u_char spi_spim;
434 char res3[2];
435 u_char spi_spcom;
436 char res4[82];
437} im_spi_t;
438
439/* CPM Mux.
440*/
441typedef struct cpmux {
442 u_char cmx_si1cr;
443 char res1;
444 u_char cmx_si2cr;
445 char res2;
446 uint cmx_fcr;
447 uint cmx_scr;
448 u_char cmx_smr;
449 char res3;
450 ushort cmx_uar;
451 char res4[16];
452} cpmux_t;
453
454/* SIRAM control
455*/
456typedef struct siram {
457 ushort si_amr;
458 ushort si_bmr;
459 ushort si_cmr;
460 ushort si_dmr;
461 u_char si_gmr;
462 char res1;
463 u_char si_cmdr;
464 char res2;
465 u_char si_str;
466 char res3;
467 ushort si_rsr;
468} siramctl_t;
469
470typedef struct mcc {
471 ushort mcc_mcce;
472 char res1[2];
473 ushort mcc_mccm;
474 char res2[2];
475 u_char mcc_mccf;
476 char res3[7];
477} mcc_t;
478
479typedef struct comm_proc {
480 uint cp_cpcr;
481 uint cp_rccr;
482 char res1[14];
483 ushort cp_rter;
484 char res2[2];
485 ushort cp_rtmr;
486 ushort cp_rtscr;
487 char res3[2];
488 uint cp_rtsr;
489 char res4[12];
490} cpm8260_t;
491
492/* ...and the whole thing wrapped up....
493*/
494typedef struct immap {
495 /* Some references are into the unique and known dpram spaces,
496 * others are from the generic base.
497 */
498#define im_dprambase im_dpram1
499 u_char im_dpram1[16*1024];
500 char res1[16*1024];
501 u_char im_dpram2[4*1024];
502 char res2[8*1024];
503 u_char im_dpram3[4*1024];
504 char res3[16*1024];
505
506 sysconf8260_t im_siu_conf; /* SIU Configuration */
507 memctl8260_t im_memctl; /* Memory Controller */
508 sit8260_t im_sit; /* System Integration Timers */
wdenk56ed43e2004-02-22 23:46:08 +0000509 pci8260_t im_pci; /* PCI Configuration */
wdenk1f045212002-03-10 14:37:15 +0000510 intctl8260_t im_intctl; /* Interrupt Controller */
511 car8260_t im_clkrst; /* Clocks and reset */
512 iop8260_t im_ioport; /* IO Port control/status */
513 cpmtimer8260_t im_cpmtimer; /* CPM timers */
514 sdma8260_t im_sdma; /* SDMA control/status */
515
516 fcc_t im_fcc[3]; /* Three FCCs */
517
518 char res4[159];
519
520 /* First set of baud rate generators.
521 */
522 char res4a[496];
523 uint im_brgc5;
524 uint im_brgc6;
525 uint im_brgc7;
526 uint im_brgc8;
527
528 char res5[608];
529
530 i2c8260_t im_i2c; /* I2C control/status */
531 cpm8260_t im_cpm; /* Communication processor */
532
533 /* Second set of baud rate generators.
534 */
535 uint im_brgc1;
536 uint im_brgc2;
537 uint im_brgc3;
538 uint im_brgc4;
539
540 scc_t im_scc[4]; /* Four SCCs */
541 smc_t im_smc[2]; /* Couple of SMCs */
542 im_spi_t im_spi; /* A SPI */
543 cpmux_t im_cpmux; /* CPM clock route mux */
544 siramctl_t im_siramctl1; /* First SI RAM Control */
545 mcc_t im_mcc1; /* First MCC */
546 siramctl_t im_siramctl2; /* Second SI RAM Control */
547 mcc_t im_mcc2; /* Second MCC */
548
549 char res6[1184];
550
551 ushort im_si1txram[256];
552 char res7[512];
553 ushort im_si1rxram[256];
554 char res8[512];
555 ushort im_si2txram[256];
556 char res9[512];
557 ushort im_si2rxram[256];
558 char res10[512];
559 char res11[4096];
560} immap_t;
561
562#endif /* __IMMAP_82XX__ */