immap_83xx.h 24.9 KB
Newer Older
Eran Liberty's avatar
Eran Liberty committed
1
/*
2
 * (C) Copyright 2004-2009 Freescale Semiconductor, Inc.
3 4 5
 *
 * MPC83xx Internal Memory Map
 *
6 7 8 9 10
 * Contributors:
 *	Dave Liu <daveliu@freescale.com>
 *	Tanya Jiang <tanya.jiang@freescale.com>
 *	Mandy Lavi <mandy.lavi@freescale.com>
 *	Eran Liberty <liberty@freescale.com>
11 12 13 14 15 16 17 18
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 21 22 23 24 25
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 * MA 02111-1307 USA
26
 *
Eran Liberty's avatar
Eran Liberty committed
27
 */
28 29
#ifndef __IMMAP_83xx__
#define __IMMAP_83xx__
Eran Liberty's avatar
Eran Liberty committed
30 31

#include <asm/types.h>
32
#include <asm/fsl_i2c.h>
33
#include <asm/mpc8xxx_spi.h>
34
#include <asm/fsl_lbc.h>
35
#include <asm/fsl_dma.h>
Eran Liberty's avatar
Eran Liberty committed
36

37
/*
38
 * Local Access Window
Eran Liberty's avatar
Eran Liberty committed
39
 */
40
typedef struct law83xx {
41 42
	u32 bar;		/* LBIU local access window base address register */
	u32 ar;			/* LBIU local access window attribute register */
43
} law83xx_t;
Eran Liberty's avatar
Eran Liberty committed
44

45
/*
46
 * System configuration registers
Eran Liberty's avatar
Eran Liberty committed
47
 */
48
typedef struct sysconf83xx {
49
	u32 immrbar;		/* Internal memory map base address register */
Eran Liberty's avatar
Eran Liberty committed
50
	u8 res0[0x04];
51
	u32 altcbar;		/* Alternate configuration base address register */
Eran Liberty's avatar
Eran Liberty committed
52
	u8 res1[0x14];
53
	law83xx_t lblaw[4];	/* LBIU local access window */
Eran Liberty's avatar
Eran Liberty committed
54
	u8 res2[0x20];
55
	law83xx_t pcilaw[2];	/* PCI local access window */
56 57 58
	u8 res3[0x10];
	law83xx_t pcielaw[2];	/* PCI Express local access window */
	u8 res4[0x10];
59
	law83xx_t ddrlaw[2];	/* DDR local access window */
60
	u8 res5[0x50];
61 62 63
	u32 sgprl;		/* System General Purpose Register Low */
	u32 sgprh;		/* System General Purpose Register High */
	u32 spridr;		/* System Part and Revision ID Register */
64
	u8 res6[0x04];
65
	u32 spcr;		/* System Priority Configuration Register */
66 67
	u32 sicrl;		/* System I/O Configuration Register Low */
	u32 sicrh;		/* System I/O Configuration Register High */
68
	u8 res7[0x04];
69 70
	u32 sidcr0;		/* System I/O Delay Configuration Register 0 */
	u32 sidcr1;		/* System I/O Delay Configuration Register 1 */
71 72
	u32 ddrcdr;		/* DDR Control Driver Register */
	u32 ddrdsr;		/* DDR Debug Status Register */
73
	u32 obir;		/* Output Buffer Impedance Register */
74 75 76 77
	u8 res8[0xC];
	u32 pecr1;		/* PCI Express control register 1 */
	u32 pecr2;		/* PCI Express control register 2 */
	u8 res9[0xB8];
78
} sysconf83xx_t;
Eran Liberty's avatar
Eran Liberty committed
79

80
/*
Eran Liberty's avatar
Eran Liberty committed
81 82
 * Watch Dog Timer (WDT) Registers
 */
83
typedef struct wdt83xx {
84
	u8 res0[4];
85 86
	u32 swcrr;		/* System watchdog control register */
	u32 swcnr;		/* System watchdog count register */
87
	u8 res1[2];
88
	u16 swsrr;		/* System watchdog service register */
Eran Liberty's avatar
Eran Liberty committed
89
	u8 res2[0xF0];
90
} wdt83xx_t;
91

Eran Liberty's avatar
Eran Liberty committed
92 93 94
/*
 * RTC/PIT Module Registers
 */
95
typedef struct rtclk83xx {
96 97 98
	u32 cnr;		/* control register */
	u32 ldr;		/* load register */
	u32 psr;		/* prescale register */
99
	u32 ctr;		/* counter value field register */
100 101
	u32 evr;		/* event register */
	u32 alr;		/* alarm register */
Eran Liberty's avatar
Eran Liberty committed
102
	u8 res0[0xE8];
103
} rtclk83xx_t;
Eran Liberty's avatar
Eran Liberty committed
104 105

/*
106
 * Global timer module
Eran Liberty's avatar
Eran Liberty committed
107
 */
108
typedef struct gtm83xx {
109
	u8 cfr1;		/* Timer1/2 Configuration */
110
	u8 res0[3];
111
	u8 cfr2;		/* Timer3/4 Configuration */
112
	u8 res1[10];
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
	u16 mdr1;		/* Timer1 Mode Register */
	u16 mdr2;		/* Timer2 Mode Register */
	u16 rfr1;		/* Timer1 Reference Register */
	u16 rfr2;		/* Timer2 Reference Register */
	u16 cpr1;		/* Timer1 Capture Register */
	u16 cpr2;		/* Timer2 Capture Register */
	u16 cnr1;		/* Timer1 Counter Register */
	u16 cnr2;		/* Timer2 Counter Register */
	u16 mdr3;		/* Timer3 Mode Register */
	u16 mdr4;		/* Timer4 Mode Register */
	u16 rfr3;		/* Timer3 Reference Register */
	u16 rfr4;		/* Timer4 Reference Register */
	u16 cpr3;		/* Timer3 Capture Register */
	u16 cpr4;		/* Timer4 Capture Register */
	u16 cnr3;		/* Timer3 Counter Register */
	u16 cnr4;		/* Timer4 Counter Register */
	u16 evr1;		/* Timer1 Event Register */
	u16 evr2;		/* Timer2 Event Register */
	u16 evr3;		/* Timer3 Event Register */
	u16 evr4;		/* Timer4 Event Register */
	u16 psr1;		/* Timer1 Prescaler Register */
	u16 psr2;		/* Timer2 Prescaler Register */
	u16 psr3;		/* Timer3 Prescaler Register */
	u16 psr4;		/* Timer4 Prescaler Register */
137
	u8 res[0xC0];
138
} gtm83xx_t;
Eran Liberty's avatar
Eran Liberty committed
139 140 141 142

/*
 * Integrated Programmable Interrupt Controller
 */
143
typedef struct ipic83xx {
144 145 146 147 148
	u32 sicfr;		/* System Global Interrupt Configuration Register */
	u32 sivcr;		/* System Global Interrupt Vector Register */
	u32 sipnr_h;		/* System Internal Interrupt Pending Register - High */
	u32 sipnr_l;		/* System Internal Interrupt Pending Register - Low */
	u32 siprr_a;		/* System Internal Interrupt Group A Priority Register */
149
	u8 res0[8];
150 151 152
	u32 siprr_d;		/* System Internal Interrupt Group D Priority Register */
	u32 simsr_h;		/* System Internal Interrupt Mask Register - High */
	u32 simsr_l;		/* System Internal Interrupt Mask Register - Low */
153
	u8 res1[4];
154 155 156 157 158 159 160 161
	u32 sepnr;		/* System External Interrupt Pending Register */
	u32 smprr_a;		/* System Mixed Interrupt Group A Priority Register */
	u32 smprr_b;		/* System Mixed Interrupt Group B Priority Register */
	u32 semsr;		/* System External Interrupt Mask Register */
	u32 secnr;		/* System External Interrupt Control Register */
	u32 sersr;		/* System Error Status Register */
	u32 sermr;		/* System Error Mask Register */
	u32 sercr;		/* System Error Control Register */
162
	u8 res2[4];
163 164 165 166
	u32 sifcr_h;		/* System Internal Interrupt Force Register - High */
	u32 sifcr_l;		/* System Internal Interrupt Force Register - Low */
	u32 sefcr;		/* System External Interrupt Force Register */
	u32 serfr;		/* System Error Force Register */
167 168 169
	u32 scvcr;		/* System Critical Interrupt Vector Register */
	u32 smvcr;		/* System Management Interrupt Vector Register */
	u8 res3[0x98];
170
} ipic83xx_t;
Eran Liberty's avatar
Eran Liberty committed
171 172 173 174

/*
 * System Arbiter Registers
 */
175
typedef struct arbiter83xx {
176 177
	u32 acr;		/* Arbiter Configuration Register */
	u32 atr;		/* Arbiter Timers Register */
Eran Liberty's avatar
Eran Liberty committed
178
	u8 res[4];
179 180 181
	u32 aer;		/* Arbiter Event Register */
	u32 aidr;		/* Arbiter Interrupt Definition Register */
	u32 amr;		/* Arbiter Mask Register */
182 183
	u32 aeatr;		/* Arbiter Event Attributes Register */
	u32 aeadr;		/* Arbiter Event Address Register */
184
	u32 aerr;		/* Arbiter Event Response Register */
Eran Liberty's avatar
Eran Liberty committed
185
	u8 res1[0xDC];
186
} arbiter83xx_t;
Eran Liberty's avatar
Eran Liberty committed
187 188 189 190

/*
 * Reset Module
 */
191
typedef struct reset83xx {
192 193
	u32 rcwl;		/* Reset Configuration Word Low Register */
	u32 rcwh;		/* Reset Configuration Word High Register */
194
	u8 res0[8];
195 196 197 198 199
	u32 rsr;		/* Reset Status Register */
	u32 rmr;		/* Reset Mode Register */
	u32 rpr;		/* Reset protection Register */
	u32 rcr;		/* Reset Control Register */
	u32 rcer;		/* Reset Control Enable Register */
200
	u8 res1[0xDC];
201
} reset83xx_t;
202

203 204 205
/*
 * Clock Module
 */
206
typedef struct clk83xx {
207 208 209
	u32 spmr;		/* system PLL mode Register */
	u32 occr;		/* output clock control Register */
	u32 sccr;		/* system clock control Register */
210
	u8 res0[0xF4];
211
} clk83xx_t;
Eran Liberty's avatar
Eran Liberty committed
212 213 214 215

/*
 * Power Management Control Module
 */
216
typedef struct pmc83xx {
217 218 219
	u32 pmccr;		/* PMC Configuration Register */
	u32 pmcer;		/* PMC Event Register */
	u32 pmcmr;		/* PMC Mask Register */
220 221 222
	u32 pmccr1;		/* PMC Configuration Register 1 */
	u32 pmccr2;		/* PMC Configuration Register 2 */
	u8 res0[0xEC];
223
} pmc83xx_t;
Eran Liberty's avatar
Eran Liberty committed
224 225

/*
226
 * General purpose I/O module
Eran Liberty's avatar
Eran Liberty committed
227
 */
228
typedef struct gpio83xx {
229 230 231 232 233 234
	u32 dir;		/* direction register */
	u32 odr;		/* open drain register */
	u32 dat;		/* data register */
	u32 ier;		/* interrupt event register */
	u32 imr;		/* interrupt mask register */
	u32 icr;		/* external interrupt control register */
Eran Liberty's avatar
Eran Liberty committed
235
	u8 res0[0xE8];
236
} gpio83xx_t;
237 238 239 240 241 242 243 244 245 246 247 248 249

/*
 * QE Ports Interrupts Registers
 */
typedef struct qepi83xx {
	u8 res0[0xC];
	u32 qepier;		/* QE Ports Interrupt Event Register */
	u32 qepimr;		/* QE Ports Interrupt Mask Register */
	u32 qepicr;		/* QE Ports Interrupt Control Register */
	u8 res1[0xE8];
} qepi83xx_t;

/*
250
 * QE Parallel I/O Ports
251 252 253 254 255 256 257 258 259 260
 */
typedef struct gpio_n {
	u32 podr;		/* Open Drain Register */
	u32 pdat;		/* Data Register */
	u32 dir1;		/* direction register 1 */
	u32 dir2;		/* direction register 2 */
	u32 ppar1;		/* Pin Assignment Register 1 */
	u32 ppar2;		/* Pin Assignment Register 2 */
} gpio_n_t;

261
typedef struct qegpio83xx {
262 263
	gpio_n_t ioport[0x7];
	u8 res0[0x358];
264
} qepio83xx_t;
265 266 267 268 269 270 271 272 273 274 275

/*
 * QE Secondary Bus Access Windows
 */
typedef struct qesba83xx {
	u32 lbmcsar;		/* Local bus memory controller start address */
	u32 sdmcsar;		/* Secondary DDR memory controller start address */
	u8 res0[0x38];
	u32 lbmcear;		/* Local bus memory controller end address */
	u32 sdmcear;		/* Secondary DDR memory controller end address */
	u8 res1[0x38];
276
	u32 lbmcar;		/* Local bus memory controller attributes */
277
	u32 sdmcar;		/* Secondary DDR memory controller attributes */
278
	u8 res2[0x378];
279
} qesba83xx_t;
Eran Liberty's avatar
Eran Liberty committed
280

281
/*
Eran Liberty's avatar
Eran Liberty committed
282 283
 * DDR Memory Controller Memory Map
 */
284
typedef struct ddr_cs_bnds {
285
	u32 csbnds;
286
	u8 res0[4];
Eran Liberty's avatar
Eran Liberty committed
287 288
} ddr_cs_bnds_t;

289
typedef struct ddr83xx {
290
	ddr_cs_bnds_t csbnds[4];/* Chip Select x Memory Bounds */
291
	u8 res0[0x60];
292
	u32 cs_config[4];	/* Chip Select x Configuration */
293 294 295
	u8 res1[0x70];
	u32 timing_cfg_3;	/* SDRAM Timing Configuration 3 */
	u32 timing_cfg_0;	/* SDRAM Timing Configuration 0 */
296 297 298
	u32 timing_cfg_1;	/* SDRAM Timing Configuration 1 */
	u32 timing_cfg_2;	/* SDRAM Timing Configuration 2 */
	u32 sdram_cfg;		/* SDRAM Control Configuration */
299
	u32 sdram_cfg2;		/* SDRAM Control Configuration 2 */
300
	u32 sdram_mode;		/* SDRAM Mode Configuration */
301 302
	u32 sdram_mode2;	/* SDRAM Mode Configuration 2 */
	u32 sdram_md_cntl;	/* SDRAM Mode Control */
303
	u32 sdram_interval;	/* SDRAM Interval Configuration */
304 305 306 307 308 309 310 311 312 313
	u32 ddr_data_init;	/* SDRAM Data Initialization */
	u8 res2[4];
	u32 sdram_clk_cntl;	/* SDRAM Clock Control */
	u8 res3[0x14];
	u32 ddr_init_addr;	/* DDR training initialization address */
	u32 ddr_init_ext_addr;	/* DDR training initialization extended address */
	u8 res4[0xAA8];
	u32 ddr_ip_rev1;	/* DDR IP block revision 1 */
	u32 ddr_ip_rev2;	/* DDR IP block revision 2 */
	u8 res5[0x200];
314 315 316
	u32 data_err_inject_hi;	/* Memory Data Path Error Injection Mask High */
	u32 data_err_inject_lo;	/* Memory Data Path Error Injection Mask Low */
	u32 ecc_err_inject;	/* Memory Data Path Error Injection Mask ECC */
317
	u8 res6[0x14];
318 319 320
	u32 capture_data_hi;	/* Memory Data Path Read Capture High */
	u32 capture_data_lo;	/* Memory Data Path Read Capture Low */
	u32 capture_ecc;	/* Memory Data Path Read Capture ECC */
321
	u8 res7[0x14];
322 323 324 325 326 327 328
	u32 err_detect;		/* Memory Error Detect */
	u32 err_disable;	/* Memory Error Disable */
	u32 err_int_en;		/* Memory Error Interrupt Enable */
	u32 capture_attributes;	/* Memory Error Attributes Capture */
	u32 capture_address;	/* Memory Error Address Capture */
	u32 capture_ext_address;/* Memory Error Extended Address Capture */
	u32 err_sbe;		/* Memory Single-Bit ECC Error Management */
329
	u8 res8[0xA4];
Eran Liberty's avatar
Eran Liberty committed
330
	u32 debug_reg;
331
	u8 res9[0xFC];
332
} ddr83xx_t;
Eran Liberty's avatar
Eran Liberty committed
333 334 335 336

/*
 * DUART
 */
337
typedef struct duart83xx {
338 339 340 341 342 343 344 345
	u8 urbr_ulcr_udlb;	/* combined register for URBR, UTHR and UDLB */
	u8 uier_udmb;		/* combined register for UIER and UDMB */
	u8 uiir_ufcr_uafr;	/* combined register for UIIR, UFCR and UAFR */
	u8 ulcr;		/* line control register */
	u8 umcr;		/* MODEM control register */
	u8 ulsr;		/* line status register */
	u8 umsr;		/* MODEM status register */
	u8 uscr;		/* scratch register */
346
	u8 res0[8];
347
	u8 udsr;		/* DMA status register */
348 349
	u8 res1[3];
	u8 res2[0xEC];
350
} duart83xx_t;
Eran Liberty's avatar
Eran Liberty committed
351

352 353 354
/*
 * DMA/Messaging Unit
 */
355
typedef struct dma83xx {
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370
	u32 res0[0xC];		/* 0x0-0x29 reseverd */
	u32 omisr;		/* 0x30 Outbound message interrupt status register */
	u32 omimr;		/* 0x34 Outbound message interrupt mask register */
	u32 res1[0x6];		/* 0x38-0x49 reserved */
	u32 imr0;		/* 0x50 Inbound message register 0 */
	u32 imr1;		/* 0x54 Inbound message register 1 */
	u32 omr0;		/* 0x58 Outbound message register 0 */
	u32 omr1;		/* 0x5C Outbound message register 1 */
	u32 odr;		/* 0x60 Outbound doorbell register */
	u32 res2;		/* 0x64-0x67 reserved */
	u32 idr;		/* 0x68 Inbound doorbell register */
	u32 res3[0x5];		/* 0x6C-0x79 reserved */
	u32 imisr;		/* 0x80 Inbound message interrupt status register */
	u32 imimr;		/* 0x84 Inbound message interrupt mask register */
	u32 res4[0x1E];		/* 0x88-0x99 reserved */
371
	struct fsl_dma dma[4];
372
} dma83xx_t;
Eran Liberty's avatar
Eran Liberty committed
373 374 375 376

/*
 * PCI Software Configuration Registers
 */
377
typedef struct pciconf83xx {
378
	u32 config_address;
Eran Liberty's avatar
Eran Liberty committed
379 380
	u32 config_data;
	u32 int_ack;
381
	u8 res[116];
382
} pciconf83xx_t;
Eran Liberty's avatar
Eran Liberty committed
383 384 385 386 387

/*
 * PCI Outbound Translation Register
 */
typedef struct pci_outbound_window {
388 389 390 391 392 393
	u32 potar;
	u8 res0[4];
	u32 pobar;
	u8 res1[4];
	u32 pocmr;
	u8 res2[4];
394
} pot83xx_t;
395

Eran Liberty's avatar
Eran Liberty committed
396 397
/*
 * Sequencer
398
 */
399
typedef struct ios83xx {
400 401 402 403 404 405
	pot83xx_t pot[6];
	u8 res0[0x60];
	u32 pmcr;
	u8 res1[4];
	u32 dtcr;
	u8 res2[4];
406
} ios83xx_t;
Eran Liberty's avatar
Eran Liberty committed
407 408 409 410

/*
 * PCI Controller Control and Status Registers
 */
411
typedef struct pcictrl83xx {
412 413
	u32 esr;
	u32 ecdr;
Eran Liberty's avatar
Eran Liberty committed
414
	u32 eer;
415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441
	u32 eatcr;
	u32 eacr;
	u32 eeacr;
	u32 edlcr;
	u32 edhcr;
	u32 gcr;
	u32 ecr;
	u32 gsr;
	u8 res0[12];
	u32 pitar2;
	u8 res1[4];
	u32 pibar2;
	u32 piebar2;
	u32 piwar2;
	u8 res2[4];
	u32 pitar1;
	u8 res3[4];
	u32 pibar1;
	u32 piebar1;
	u32 piwar1;
	u8 res4[4];
	u32 pitar0;
	u8 res5[4];
	u32 pibar0;
	u8 res6[4];
	u32 piwar0;
	u8 res7[132];
442
} pcictrl83xx_t;
Eran Liberty's avatar
Eran Liberty committed
443 444

/*
445
 * USB
Eran Liberty's avatar
Eran Liberty committed
446
 */
447
typedef struct usb83xx {
448
	u8 fixme[0x1000];
449
} usb83xx_t;
Eran Liberty's avatar
Eran Liberty committed
450 451 452 453

/*
 * TSEC
 */
454
typedef struct tsec83xx {
Eran Liberty's avatar
Eran Liberty committed
455
	u8 fixme[0x1000];
456
} tsec83xx_t;
Eran Liberty's avatar
Eran Liberty committed
457 458 459 460

/*
 * Security
 */
461
typedef struct security83xx {
Eran Liberty's avatar
Eran Liberty committed
462
	u8 fixme[0x10000];
463
} security83xx_t;
Eran Liberty's avatar
Eran Liberty committed
464

465 466 467
/*
 *  PCI Express
 */
468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542
struct pex_inbound_window {
	u32 ar;
	u32 tar;
	u32 barl;
	u32 barh;
};

struct pex_outbound_window {
	u32 ar;
	u32 bar;
	u32 tarl;
	u32 tarh;
};

struct pex_csb_bridge {
	u32 pex_csb_ver;
	u32 pex_csb_cab;
	u32 pex_csb_ctrl;
	u8 res0[8];
	u32 pex_dms_dstmr;
	u8 res1[4];
	u32 pex_cbs_stat;
	u8 res2[0x20];
	u32 pex_csb_obctrl;
	u32 pex_csb_obstat;
	u8 res3[0x98];
	u32 pex_csb_ibctrl;
	u32 pex_csb_ibstat;
	u8 res4[0xb8];
	u32 pex_wdma_ctrl;
	u32 pex_wdma_addr;
	u32 pex_wdma_stat;
	u8 res5[0x94];
	u32 pex_rdma_ctrl;
	u32 pex_rdma_addr;
	u32 pex_rdma_stat;
	u8 res6[0xd4];
	u32 pex_ombcr;
	u32 pex_ombdr;
	u8 res7[0x38];
	u32 pex_imbcr;
	u32 pex_imbdr;
	u8 res8[0x38];
	u32 pex_int_enb;
	u32 pex_int_stat;
	u32 pex_int_apio_vec1;
	u32 pex_int_apio_vec2;
	u8 res9[0x10];
	u32 pex_int_ppio_vec1;
	u32 pex_int_ppio_vec2;
	u32 pex_int_wdma_vec1;
	u32 pex_int_wdma_vec2;
	u32 pex_int_rdma_vec1;
	u32 pex_int_rdma_vec2;
	u32 pex_int_misc_vec;
	u8 res10[4];
	u32 pex_int_axi_pio_enb;
	u32 pex_int_axi_wdma_enb;
	u32 pex_int_axi_rdma_enb;
	u32 pex_int_axi_misc_enb;
	u32 pex_int_axi_pio_stat;
	u32 pex_int_axi_wdma_stat;
	u32 pex_int_axi_rdma_stat;
	u32 pex_int_axi_misc_stat;
	u8 res11[0xa0];
	struct pex_outbound_window pex_outbound_win[4];
	u8 res12[0x100];
	u32 pex_epiwtar0;
	u32 pex_epiwtar1;
	u32 pex_epiwtar2;
	u32 pex_epiwtar3;
	u8 res13[0x70];
	struct pex_inbound_window pex_inbound_win[4];
};

543
typedef struct pex83xx {
544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571
	u8 pex_cfg_header[0x404];
	u32 pex_ltssm_stat;
	u8 res0[0x30];
	u32 pex_ack_replay_timeout;
	u8 res1[4];
	u32 pex_gclk_ratio;
	u8 res2[0xc];
	u32 pex_pm_timer;
	u32 pex_pme_timeout;
	u8 res3[4];
	u32 pex_aspm_req_timer;
	u8 res4[0x18];
	u32 pex_ssvid_update;
	u8 res5[0x34];
	u32 pex_cfg_ready;
	u8 res6[0x24];
	u32 pex_bar_sizel;
	u8 res7[4];
	u32 pex_bar_sel;
	u8 res8[0x20];
	u32 pex_bar_pf;
	u8 res9[0x88];
	u32 pex_pme_to_ack_tor;
	u8 res10[0xc];
	u32 pex_ss_intr_mask;
	u8 res11[0x25c];
	struct pex_csb_bridge bridge;
	u8 res12[0x160];
572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601
} pex83xx_t;

/*
 * SATA
 */
typedef struct sata83xx {
	u8 fixme[0x1000];
} sata83xx_t;

/*
 * eSDHC
 */
typedef struct sdhc83xx {
	u8 fixme[0x1000];
} sdhc83xx_t;

/*
 * SerDes
 */
typedef struct serdes83xx {
	u8 fixme[0x100];
} serdes83xx_t;

/*
 * On Chip ROM
 */
typedef struct rom83xx {
	u8 mem[0x10000];
} rom83xx_t;

602 603 604 605 606 607 608 609 610 611 612 613 614 615
/*
 * TDM
 */
typedef struct tdm83xx {
	u8 fixme[0x200];
} tdm83xx_t;

/*
 * TDM DMAC
 */
typedef struct tdmdmac83xx {
	u8 fixme[0x2000];
} tdmdmac83xx_t;

616
#if defined(CONFIG_MPC834x)
617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637
typedef struct immap {
	sysconf83xx_t		sysconf;	/* System configuration */
	wdt83xx_t		wdt;		/* Watch Dog Timer (WDT) Registers */
	rtclk83xx_t		rtc;		/* Real Time Clock Module Registers */
	rtclk83xx_t		pit;		/* Periodic Interval Timer */
	gtm83xx_t		gtm[2];		/* Global Timers Module */
	ipic83xx_t		ipic;		/* Integrated Programmable Interrupt Controller */
	arbiter83xx_t		arbiter;	/* System Arbiter Registers */
	reset83xx_t		reset;		/* Reset Module */
	clk83xx_t		clk;		/* System Clock Module */
	pmc83xx_t		pmc;		/* Power Management Control Module */
	gpio83xx_t		gpio[2];	/* General purpose I/O module */
	u8			res0[0x200];
	u8			dll_ddr[0x100];
	u8			dll_lbc[0x100];
	u8			res1[0xE00];
	ddr83xx_t		ddr;		/* DDR Memory Controller Memory */
	fsl_i2c_t		i2c[2];		/* I2C Controllers */
	u8			res2[0x1300];
	duart83xx_t		duart[2];	/* DUART */
	u8			res3[0x900];
638
	fsl_lbus_t		lbus;	/* Local Bus Controller Registers */
639
	u8			res4[0x1000];
640
	spi8xxx_t		spi;		/* Serial Peripheral Interface */
641 642 643 644 645
	dma83xx_t		dma;		/* DMA */
	pciconf83xx_t		pci_conf[2];	/* PCI Software Configuration Registers */
	ios83xx_t		ios;		/* Sequencer */
	pcictrl83xx_t		pci_ctrl[2];	/* PCI Controller Control and Status Registers */
	u8			res5[0x19900];
646 647 648 649 650 651 652
	usb83xx_t		usb[2];
	tsec83xx_t		tsec[2];
	u8			res6[0xA000];
	security83xx_t		security;
	u8			res7[0xC0000];
} immap_t;

653
#elif defined(CONFIG_MPC8313)
654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671
typedef struct immap {
	sysconf83xx_t		sysconf;	/* System configuration */
	wdt83xx_t		wdt;		/* Watch Dog Timer (WDT) Registers */
	rtclk83xx_t		rtc;		/* Real Time Clock Module Registers */
	rtclk83xx_t		pit;		/* Periodic Interval Timer */
	gtm83xx_t		gtm[2];		/* Global Timers Module */
	ipic83xx_t		ipic;		/* Integrated Programmable Interrupt Controller */
	arbiter83xx_t		arbiter;	/* System Arbiter Registers */
	reset83xx_t		reset;		/* Reset Module */
	clk83xx_t		clk;		/* System Clock Module */
	pmc83xx_t		pmc;		/* Power Management Control Module */
	gpio83xx_t		gpio[1];	/* General purpose I/O module */
	u8			res0[0x1300];
	ddr83xx_t		ddr;		/* DDR Memory Controller Memory */
	fsl_i2c_t		i2c[2];		/* I2C Controllers */
	u8			res1[0x1300];
	duart83xx_t		duart[2];	/* DUART */
	u8			res2[0x900];
672
	fsl_lbus_t		lbus;	/* Local Bus Controller Registers */
673
	u8			res3[0x1000];
674
	spi8xxx_t		spi;		/* Serial Peripheral Interface */
675 676 677 678 679 680 681
	dma83xx_t		dma;		/* DMA */
	pciconf83xx_t		pci_conf[1];	/* PCI Software Configuration Registers */
	u8			res4[0x80];
	ios83xx_t		ios;		/* Sequencer */
	pcictrl83xx_t		pci_ctrl[1];	/* PCI Controller Control and Status Registers */
	u8			res5[0x1aa00];
	usb83xx_t		usb[1];
682 683 684 685 686
	tsec83xx_t		tsec[2];
	u8			res6[0xA000];
	security83xx_t		security;
	u8			res7[0xC0000];
} immap_t;
687

688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706
#elif defined(CONFIG_MPC8315)
typedef struct immap {
	sysconf83xx_t		sysconf;	/* System configuration */
	wdt83xx_t		wdt;		/* Watch Dog Timer (WDT) Registers */
	rtclk83xx_t		rtc;		/* Real Time Clock Module Registers */
	rtclk83xx_t		pit;		/* Periodic Interval Timer */
	gtm83xx_t		gtm[2];		/* Global Timers Module */
	ipic83xx_t		ipic;		/* Integrated Programmable Interrupt Controller */
	arbiter83xx_t		arbiter;	/* System Arbiter Registers */
	reset83xx_t		reset;		/* Reset Module */
	clk83xx_t		clk;		/* System Clock Module */
	pmc83xx_t		pmc;		/* Power Management Control Module */
	gpio83xx_t		gpio[1];	/* General purpose I/O module */
	u8			res0[0x1300];
	ddr83xx_t		ddr;		/* DDR Memory Controller Memory */
	fsl_i2c_t		i2c[2];		/* I2C Controllers */
	u8			res1[0x1300];
	duart83xx_t		duart[2];	/* DUART */
	u8			res2[0x900];
707
	fsl_lbus_t		lbus;	/* Local Bus Controller Registers */
708
	u8			res3[0x1000];
709
	spi8xxx_t		spi;		/* Serial Peripheral Interface */
710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732
	dma83xx_t		dma;		/* DMA */
	pciconf83xx_t		pci_conf[1];	/* PCI Software Configuration Registers */
	u8			res4[0x80];
	ios83xx_t		ios;		/* Sequencer */
	pcictrl83xx_t		pci_ctrl[1];	/* PCI Controller Control and Status Registers */
	u8			res5[0xa00];
	pex83xx_t		pciexp[2];	/* PCI Express Controller */
	u8			res6[0xb000];
	tdm83xx_t		tdm;		/* TDM Controller */
	u8			res7[0x1e00];
	sata83xx_t		sata[2];	/* SATA Controller */
	u8			res8[0x9000];
	usb83xx_t		usb[1];		/* USB DR Controller */
	tsec83xx_t		tsec[2];
	u8			res9[0x6000];
	tdmdmac83xx_t		tdmdmac;	/* TDM DMAC */
	u8			res10[0x2000];
	security83xx_t		security;
	u8			res11[0xA3000];
	serdes83xx_t		serdes[1];	/* SerDes Registers */
	u8			res12[0x1CF00];
} immap_t;

733
#elif defined(CONFIG_MPC837x)
734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751
typedef struct immap {
	sysconf83xx_t		sysconf;	/* System configuration */
	wdt83xx_t		wdt;		/* Watch Dog Timer (WDT) Registers */
	rtclk83xx_t		rtc;		/* Real Time Clock Module Registers */
	rtclk83xx_t		pit;		/* Periodic Interval Timer */
	gtm83xx_t		gtm[2];		/* Global Timers Module */
	ipic83xx_t		ipic;		/* Integrated Programmable Interrupt Controller */
	arbiter83xx_t		arbiter;	/* System Arbiter Registers */
	reset83xx_t		reset;		/* Reset Module */
	clk83xx_t		clk;		/* System Clock Module */
	pmc83xx_t		pmc;		/* Power Management Control Module */
	gpio83xx_t		gpio[2];	/* General purpose I/O module */
	u8			res0[0x1200];
	ddr83xx_t		ddr;		/* DDR Memory Controller Memory */
	fsl_i2c_t		i2c[2];		/* I2C Controllers */
	u8			res1[0x1300];
	duart83xx_t		duart[2];	/* DUART */
	u8			res2[0x900];
752
	fsl_lbus_t		lbus;	/* Local Bus Controller Registers */
753
	u8			res3[0x1000];
754
	spi8xxx_t		spi;		/* Serial Peripheral Interface */
755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776
	dma83xx_t		dma;		/* DMA */
	pciconf83xx_t		pci_conf[1];	/* PCI Software Configuration Registers */
	u8			res4[0x80];
	ios83xx_t		ios;		/* Sequencer */
	pcictrl83xx_t		pci_ctrl[1];	/* PCI Controller Control and Status Registers */
	u8			res5[0xa00];
	pex83xx_t		pciexp[2];	/* PCI Express Controller */
	u8			res6[0xd000];
	sata83xx_t		sata[4];	/* SATA Controller */
	u8			res7[0x7000];
	usb83xx_t		usb[1];		/* USB DR Controller */
	tsec83xx_t		tsec[2];
	u8			res8[0x8000];
	sdhc83xx_t		sdhc;		/* SDHC Controller */
	u8			res9[0x1000];
	security83xx_t		security;
	u8			res10[0xA3000];
	serdes83xx_t		serdes[2];	/* SerDes Registers */
	u8			res11[0xCE00];
	rom83xx_t		rom;		/* On Chip ROM */
} immap_t;

777
#elif defined(CONFIG_MPC8360)
Eran Liberty's avatar
Eran Liberty committed
778
typedef struct immap {
779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801
	sysconf83xx_t		sysconf;	/* System configuration */
	wdt83xx_t		wdt;		/* Watch Dog Timer (WDT) Registers */
	rtclk83xx_t		rtc;		/* Real Time Clock Module Registers */
	rtclk83xx_t		pit;		/* Periodic Interval Timer */
	u8			res0[0x200];
	ipic83xx_t		ipic;		/* Integrated Programmable Interrupt Controller */
	arbiter83xx_t		arbiter;	/* System Arbiter Registers */
	reset83xx_t		reset;		/* Reset Module */
	clk83xx_t		clk;		/* System Clock Module */
	pmc83xx_t		pmc;		/* Power Management Control Module */
	qepi83xx_t		qepi;		/* QE Ports Interrupts Registers */
	u8			res1[0x300];
	u8			dll_ddr[0x100];
	u8			dll_lbc[0x100];
	u8			res2[0x200];
	qepio83xx_t		qepio;		/* QE Parallel I/O ports */
	qesba83xx_t		qesba;		/* QE Secondary Bus Access Windows */
	u8			res3[0x400];
	ddr83xx_t		ddr;		/* DDR Memory Controller Memory */
	fsl_i2c_t		i2c[2];		/* I2C Controllers */
	u8			res4[0x1300];
	duart83xx_t		duart[2];	/* DUART */
	u8			res5[0x900];
802
	fsl_lbus_t		lbus;	/* Local Bus Controller Registers */
803 804 805 806 807 808 809 810 811 812 813 814
	u8			res6[0x2000];
	dma83xx_t		dma;		/* DMA */
	pciconf83xx_t		pci_conf[1];	/* PCI Software Configuration Registers */
	u8			res7[128];
	ios83xx_t		ios;		/* Sequencer (IOS) */
	pcictrl83xx_t		pci_ctrl[1];	/* PCI Controller Control and Status Registers */
	u8			res8[0x4A00];
	ddr83xx_t		ddr_secondary;	/* Secondary DDR Memory Controller Memory Map */
	u8			res9[0x22000];
	security83xx_t		security;
	u8			res10[0xC0000];
	u8			qe[0x100000];	/* QE block */
Eran Liberty's avatar
Eran Liberty committed
815
} immap_t;
816

817
#elif defined(CONFIG_MPC832x)
818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840
typedef struct immap {
	sysconf83xx_t		sysconf;	/* System configuration */
	wdt83xx_t		wdt;		/* Watch Dog Timer (WDT) Registers */
	rtclk83xx_t		rtc;		/* Real Time Clock Module Registers */
	rtclk83xx_t		pit;		/* Periodic Interval Timer */
	gtm83xx_t		gtm[2];		/* Global Timers Module */
	ipic83xx_t		ipic;		/* Integrated Programmable Interrupt Controller */
	arbiter83xx_t		arbiter;	/* System Arbiter Registers */
	reset83xx_t		reset;		/* Reset Module */
	clk83xx_t		clk;		/* System Clock Module */
	pmc83xx_t		pmc;		/* Power Management Control Module */
	qepi83xx_t		qepi;		/* QE Ports Interrupts Registers */
	u8			res0[0x300];
	u8			dll_ddr[0x100];
	u8			dll_lbc[0x100];
	u8			res1[0x200];
	qepio83xx_t		qepio;		/* QE Parallel I/O ports */
	u8			res2[0x800];
	ddr83xx_t		ddr;		/* DDR Memory Controller Memory */
	fsl_i2c_t		i2c[2];		/* I2C Controllers */
	u8			res3[0x1300];
	duart83xx_t		duart[2];	/* DUART */
	u8			res4[0x900];
841
	fsl_lbus_t		lbus;	/* Local Bus Controller Registers */
842 843 844 845 846 847 848 849 850 851 852
	u8			res5[0x2000];
	dma83xx_t		dma;		/* DMA */
	pciconf83xx_t		pci_conf[1];	/* PCI Software Configuration Registers */
	u8			res6[128];
	ios83xx_t		ios;		/* Sequencer (IOS) */
	pcictrl83xx_t		pci_ctrl[1];	/* PCI Controller Control and Status Registers */
	u8			res7[0x27A00];
	security83xx_t		security;
	u8			res8[0xC0000];
	u8			qe[0x100000];	/* QE block */
} immap_t;
853
#endif
Eran Liberty's avatar
Eran Liberty committed
854

855 856
#define CONFIG_SYS_MPC83xx_DMA_OFFSET	(0x8000)
#define CONFIG_SYS_MPC83xx_DMA_ADDR	(CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_DMA_OFFSET)
857 858
#define CONFIG_SYS_MPC83xx_ESDHC_OFFSET	(0x2e000)
#define CONFIG_SYS_MPC83xx_ESDHC_ADDR	(CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_ESDHC_OFFSET)
859 860 861
#define CONFIG_SYS_MPC83xx_USB_OFFSET	0x23000
#define CONFIG_SYS_MPC83xx_USB_ADDR \
			(CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_USB_OFFSET)
862
#endif				/* __IMMAP_83xx__ */