blob: 67b035c6140242adbed76e6910cbc0dcb81c54cc [file] [log] [blame]
Eran Liberty9095d4a2005-07-28 10:08:46 -05001/*
Dave Liuf5035922006-10-25 14:41:21 -05002 * (C) Copyright 2004-2006 Freescale Semiconductor, Inc.
Jon Loeligerebc72242005-08-01 13:20:47 -05003 *
Dave Liuf5035922006-10-25 14:41:21 -05004 * MPC83xx Internal Memory Map
5 *
Dave Liu0b6bc772006-12-07 21:11:58 +08006 * Contributors:
7 * Dave Liu <daveliu@freescale.com>
8 * Tanya Jiang <tanya.jiang@freescale.com>
9 * Mandy Lavi <mandy.lavi@freescale.com>
10 * Eran Liberty <liberty@freescale.com>
Dave Liuf5035922006-10-25 14:41:21 -050011 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of
15 * the License, or (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Dave Liu0b6bc772006-12-07 21:11:58 +080019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Dave Liuf5035922006-10-25 14:41:21 -050020 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
25 * MA 02111-1307 USA
26 *
Eran Liberty9095d4a2005-07-28 10:08:46 -050027 */
Dave Liuf5035922006-10-25 14:41:21 -050028#ifndef __IMMAP_83xx__
29#define __IMMAP_83xx__
Eran Liberty9095d4a2005-07-28 10:08:46 -050030
31#include <asm/types.h>
Timur Tabiab347542006-11-03 19:15:00 -060032#include <asm/fsl_i2c.h>
Eran Liberty9095d4a2005-07-28 10:08:46 -050033
Jon Loeligerebc72242005-08-01 13:20:47 -050034/*
Dave Liu0b6bc772006-12-07 21:11:58 +080035 * Local Access Window
Eran Liberty9095d4a2005-07-28 10:08:46 -050036 */
Dave Liuf5035922006-10-25 14:41:21 -050037typedef struct law83xx {
Dave Liufba13692006-10-31 19:25:38 -060038 u32 bar; /* LBIU local access window base address register */
Dave Liufba13692006-10-31 19:25:38 -060039 u32 ar; /* LBIU local access window attribute register */
Dave Liuf5035922006-10-25 14:41:21 -050040} law83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -050041
Jon Loeligerebc72242005-08-01 13:20:47 -050042/*
Dave Liu0b6bc772006-12-07 21:11:58 +080043 * System configuration registers
Eran Liberty9095d4a2005-07-28 10:08:46 -050044 */
Dave Liuf5035922006-10-25 14:41:21 -050045typedef struct sysconf83xx {
Dave Liufba13692006-10-31 19:25:38 -060046 u32 immrbar; /* Internal memory map base address register */
Eran Liberty9095d4a2005-07-28 10:08:46 -050047 u8 res0[0x04];
Dave Liufba13692006-10-31 19:25:38 -060048 u32 altcbar; /* Alternate configuration base address register */
Eran Liberty9095d4a2005-07-28 10:08:46 -050049 u8 res1[0x14];
Dave Liufba13692006-10-31 19:25:38 -060050 law83xx_t lblaw[4]; /* LBIU local access window */
Eran Liberty9095d4a2005-07-28 10:08:46 -050051 u8 res2[0x20];
Dave Liufba13692006-10-31 19:25:38 -060052 law83xx_t pcilaw[2]; /* PCI local access window */
Eran Liberty9095d4a2005-07-28 10:08:46 -050053 u8 res3[0x30];
Dave Liufba13692006-10-31 19:25:38 -060054 law83xx_t ddrlaw[2]; /* DDR local access window */
Eran Liberty9095d4a2005-07-28 10:08:46 -050055 u8 res4[0x50];
Dave Liufba13692006-10-31 19:25:38 -060056 u32 sgprl; /* System General Purpose Register Low */
57 u32 sgprh; /* System General Purpose Register High */
58 u32 spridr; /* System Part and Revision ID Register */
Eran Liberty9095d4a2005-07-28 10:08:46 -050059 u8 res5[0x04];
Dave Liufba13692006-10-31 19:25:38 -060060 u32 spcr; /* System Priority Configuration Register */
Dave Liu0b6bc772006-12-07 21:11:58 +080061 u32 sicrl; /* System I/O Configuration Register Low */
62 u32 sicrh; /* System I/O Configuration Register High */
Eran Liberty9095d4a2005-07-28 10:08:46 -050063 u8 res6[0xE4];
Dave Liuf5035922006-10-25 14:41:21 -050064} sysconf83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -050065
Jon Loeligerebc72242005-08-01 13:20:47 -050066/*
Eran Liberty9095d4a2005-07-28 10:08:46 -050067 * Watch Dog Timer (WDT) Registers
68 */
Dave Liuf5035922006-10-25 14:41:21 -050069typedef struct wdt83xx {
Jon Loeligerebc72242005-08-01 13:20:47 -050070 u8 res0[4];
Dave Liufba13692006-10-31 19:25:38 -060071 u32 swcrr; /* System watchdog control register */
72 u32 swcnr; /* System watchdog count register */
Jon Loeligerebc72242005-08-01 13:20:47 -050073 u8 res1[2];
Dave Liufba13692006-10-31 19:25:38 -060074 u16 swsrr; /* System watchdog service register */
Eran Liberty9095d4a2005-07-28 10:08:46 -050075 u8 res2[0xF0];
Dave Liuf5035922006-10-25 14:41:21 -050076} wdt83xx_t;
Jon Loeligerebc72242005-08-01 13:20:47 -050077
Eran Liberty9095d4a2005-07-28 10:08:46 -050078/*
79 * RTC/PIT Module Registers
80 */
Dave Liuf5035922006-10-25 14:41:21 -050081typedef struct rtclk83xx {
Dave Liufba13692006-10-31 19:25:38 -060082 u32 cnr; /* control register */
Dave Liufba13692006-10-31 19:25:38 -060083 u32 ldr; /* load register */
Dave Liufba13692006-10-31 19:25:38 -060084 u32 psr; /* prescale register */
Dave Liu0b6bc772006-12-07 21:11:58 +080085 u32 ctr; /* counter value field register */
Dave Liufba13692006-10-31 19:25:38 -060086 u32 evr; /* event register */
Dave Liufba13692006-10-31 19:25:38 -060087 u32 alr; /* alarm register */
Eran Liberty9095d4a2005-07-28 10:08:46 -050088 u8 res0[0xE8];
Dave Liuf5035922006-10-25 14:41:21 -050089} rtclk83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -050090
91/*
Dave Liu0b6bc772006-12-07 21:11:58 +080092 * Global timer module
Eran Liberty9095d4a2005-07-28 10:08:46 -050093 */
Dave Liuf5035922006-10-25 14:41:21 -050094typedef struct gtm83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +080095 u8 cfr1; /* Timer1/2 Configuration */
Dave Liufba13692006-10-31 19:25:38 -060096 u8 res0[3];
Dave Liu0b6bc772006-12-07 21:11:58 +080097 u8 cfr2; /* Timer3/4 Configuration */
Dave Liufba13692006-10-31 19:25:38 -060098 u8 res1[10];
Dave Liu0b6bc772006-12-07 21:11:58 +080099 u16 mdr1; /* Timer1 Mode Register */
100 u16 mdr2; /* Timer2 Mode Register */
101 u16 rfr1; /* Timer1 Reference Register */
102 u16 rfr2; /* Timer2 Reference Register */
103 u16 cpr1; /* Timer1 Capture Register */
104 u16 cpr2; /* Timer2 Capture Register */
105 u16 cnr1; /* Timer1 Counter Register */
106 u16 cnr2; /* Timer2 Counter Register */
107 u16 mdr3; /* Timer3 Mode Register */
108 u16 mdr4; /* Timer4 Mode Register */
109 u16 rfr3; /* Timer3 Reference Register */
110 u16 rfr4; /* Timer4 Reference Register */
111 u16 cpr3; /* Timer3 Capture Register */
112 u16 cpr4; /* Timer4 Capture Register */
113 u16 cnr3; /* Timer3 Counter Register */
114 u16 cnr4; /* Timer4 Counter Register */
115 u16 evr1; /* Timer1 Event Register */
116 u16 evr2; /* Timer2 Event Register */
117 u16 evr3; /* Timer3 Event Register */
118 u16 evr4; /* Timer4 Event Register */
119 u16 psr1; /* Timer1 Prescaler Register */
120 u16 psr2; /* Timer2 Prescaler Register */
121 u16 psr3; /* Timer3 Prescaler Register */
122 u16 psr4; /* Timer4 Prescaler Register */
Dave Liufba13692006-10-31 19:25:38 -0600123 u8 res[0xC0];
Dave Liuf5035922006-10-25 14:41:21 -0500124} gtm83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500125
126/*
127 * Integrated Programmable Interrupt Controller
128 */
Dave Liuf5035922006-10-25 14:41:21 -0500129typedef struct ipic83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800130 u32 sicfr; /* System Global Interrupt Configuration Register */
131 u32 sivcr; /* System Global Interrupt Vector Register */
132 u32 sipnr_h; /* System Internal Interrupt Pending Register - High */
133 u32 sipnr_l; /* System Internal Interrupt Pending Register - Low */
134 u32 siprr_a; /* System Internal Interrupt Group A Priority Register */
Dave Liufba13692006-10-31 19:25:38 -0600135 u8 res0[8];
Dave Liu0b6bc772006-12-07 21:11:58 +0800136 u32 siprr_d; /* System Internal Interrupt Group D Priority Register */
137 u32 simsr_h; /* System Internal Interrupt Mask Register - High */
138 u32 simsr_l; /* System Internal Interrupt Mask Register - Low */
Dave Liufba13692006-10-31 19:25:38 -0600139 u8 res1[4];
Dave Liu0b6bc772006-12-07 21:11:58 +0800140 u32 sepnr; /* System External Interrupt Pending Register */
141 u32 smprr_a; /* System Mixed Interrupt Group A Priority Register */
142 u32 smprr_b; /* System Mixed Interrupt Group B Priority Register */
143 u32 semsr; /* System External Interrupt Mask Register */
144 u32 secnr; /* System External Interrupt Control Register */
145 u32 sersr; /* System Error Status Register */
146 u32 sermr; /* System Error Mask Register */
147 u32 sercr; /* System Error Control Register */
Dave Liufba13692006-10-31 19:25:38 -0600148 u8 res2[4];
Dave Liu0b6bc772006-12-07 21:11:58 +0800149 u32 sifcr_h; /* System Internal Interrupt Force Register - High */
150 u32 sifcr_l; /* System Internal Interrupt Force Register - Low */
151 u32 sefcr; /* System External Interrupt Force Register */
152 u32 serfr; /* System Error Force Register */
Dave Liufba13692006-10-31 19:25:38 -0600153 u32 scvcr; /* System Critical Interrupt Vector Register */
Dave Liufba13692006-10-31 19:25:38 -0600154 u32 smvcr; /* System Management Interrupt Vector Register */
Dave Liufba13692006-10-31 19:25:38 -0600155 u8 res3[0x98];
Dave Liuf5035922006-10-25 14:41:21 -0500156} ipic83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500157
158/*
159 * System Arbiter Registers
160 */
Dave Liuf5035922006-10-25 14:41:21 -0500161typedef struct arbiter83xx {
Dave Liufba13692006-10-31 19:25:38 -0600162 u32 acr; /* Arbiter Configuration Register */
Dave Liufba13692006-10-31 19:25:38 -0600163 u32 atr; /* Arbiter Timers Register */
Eran Liberty9095d4a2005-07-28 10:08:46 -0500164 u8 res[4];
Dave Liu0b6bc772006-12-07 21:11:58 +0800165 u32 aer; /* Arbiter Event Register */
166 u32 aidr; /* Arbiter Interrupt Definition Register */
167 u32 amr; /* Arbiter Mask Register */
Dave Liufba13692006-10-31 19:25:38 -0600168 u32 aeatr; /* Arbiter Event Attributes Register */
Dave Liufba13692006-10-31 19:25:38 -0600169 u32 aeadr; /* Arbiter Event Address Register */
Dave Liu0b6bc772006-12-07 21:11:58 +0800170 u32 aerr; /* Arbiter Event Response Register */
Eran Liberty9095d4a2005-07-28 10:08:46 -0500171 u8 res1[0xDC];
Dave Liuf5035922006-10-25 14:41:21 -0500172} arbiter83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500173
174/*
175 * Reset Module
176 */
Dave Liuf5035922006-10-25 14:41:21 -0500177typedef struct reset83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800178 u32 rcwl; /* Reset Configuration Word Low Register */
179 u32 rcwh; /* Reset Configuration Word High Register */
Dave Liufba13692006-10-31 19:25:38 -0600180 u8 res0[8];
Dave Liu0b6bc772006-12-07 21:11:58 +0800181 u32 rsr; /* Reset Status Register */
182 u32 rmr; /* Reset Mode Register */
183 u32 rpr; /* Reset protection Register */
184 u32 rcr; /* Reset Control Register */
185 u32 rcer; /* Reset Control Enable Register */
Dave Liufba13692006-10-31 19:25:38 -0600186 u8 res1[0xDC];
Dave Liuf5035922006-10-25 14:41:21 -0500187} reset83xx_t;
Jon Loeligerebc72242005-08-01 13:20:47 -0500188
Dave Liu0b6bc772006-12-07 21:11:58 +0800189/*
190 * Clock Module
191 */
Dave Liuf5035922006-10-25 14:41:21 -0500192typedef struct clk83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800193 u32 spmr; /* system PLL mode Register */
194 u32 occr; /* output clock control Register */
195 u32 sccr; /* system clock control Register */
Dave Liufba13692006-10-31 19:25:38 -0600196 u8 res0[0xF4];
Dave Liuf5035922006-10-25 14:41:21 -0500197} clk83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500198
199/*
200 * Power Management Control Module
201 */
Dave Liuf5035922006-10-25 14:41:21 -0500202typedef struct pmc83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800203 u32 pmccr; /* PMC Configuration Register */
204 u32 pmcer; /* PMC Event Register */
205 u32 pmcmr; /* PMC Mask Register */
Eran Liberty9095d4a2005-07-28 10:08:46 -0500206 u8 res0[0xF4];
Dave Liuf5035922006-10-25 14:41:21 -0500207} pmc83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500208
209/*
Dave Liu0b6bc772006-12-07 21:11:58 +0800210 * General purpose I/O module
Eran Liberty9095d4a2005-07-28 10:08:46 -0500211 */
Dave Liuf5035922006-10-25 14:41:21 -0500212typedef struct gpio83xx {
Dave Liufba13692006-10-31 19:25:38 -0600213 u32 dir; /* direction register */
214 u32 odr; /* open drain register */
215 u32 dat; /* data register */
216 u32 ier; /* interrupt event register */
217 u32 imr; /* interrupt mask register */
218 u32 icr; /* external interrupt control register */
Eran Liberty9095d4a2005-07-28 10:08:46 -0500219 u8 res0[0xE8];
Dave Liuf5035922006-10-25 14:41:21 -0500220} gpio83xx_t;
Dave Liufba13692006-10-31 19:25:38 -0600221
Dave Liufba13692006-10-31 19:25:38 -0600222/*
223 * QE Ports Interrupts Registers
224 */
225typedef struct qepi83xx {
226 u8 res0[0xC];
227 u32 qepier; /* QE Ports Interrupt Event Register */
Dave Liufba13692006-10-31 19:25:38 -0600228 u32 qepimr; /* QE Ports Interrupt Mask Register */
Dave Liufba13692006-10-31 19:25:38 -0600229 u32 qepicr; /* QE Ports Interrupt Control Register */
Dave Liufba13692006-10-31 19:25:38 -0600230 u8 res1[0xE8];
231} qepi83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500232
Jon Loeligerebc72242005-08-01 13:20:47 -0500233/*
Dave Liu0b6bc772006-12-07 21:11:58 +0800234 * QE Parallel I/O Ports
Dave Liufba13692006-10-31 19:25:38 -0600235 */
236typedef struct gpio_n {
237 u32 podr; /* Open Drain Register */
238 u32 pdat; /* Data Register */
239 u32 dir1; /* direction register 1 */
240 u32 dir2; /* direction register 2 */
241 u32 ppar1; /* Pin Assignment Register 1 */
242 u32 ppar2; /* Pin Assignment Register 2 */
243} gpio_n_t;
244
Dave Liu0b6bc772006-12-07 21:11:58 +0800245typedef struct qegpio83xx {
Dave Liufba13692006-10-31 19:25:38 -0600246 gpio_n_t ioport[0x7];
247 u8 res0[0x358];
Dave Liu0b6bc772006-12-07 21:11:58 +0800248} qepio83xx_t;
Dave Liufba13692006-10-31 19:25:38 -0600249
250/*
251 * QE Secondary Bus Access Windows
252 */
Dave Liufba13692006-10-31 19:25:38 -0600253typedef struct qesba83xx {
254 u32 lbmcsar; /* Local bus memory controller start address */
Dave Liufba13692006-10-31 19:25:38 -0600255 u32 sdmcsar; /* Secondary DDR memory controller start address */
Dave Liufba13692006-10-31 19:25:38 -0600256 u8 res0[0x38];
257 u32 lbmcear; /* Local bus memory controller end address */
Dave Liufba13692006-10-31 19:25:38 -0600258 u32 sdmcear; /* Secondary DDR memory controller end address */
Dave Liufba13692006-10-31 19:25:38 -0600259 u8 res1[0x38];
Dave Liu0b6bc772006-12-07 21:11:58 +0800260 u32 lbmcar; /* Local bus memory controller attributes */
Dave Liufba13692006-10-31 19:25:38 -0600261 u32 sdmcar; /* Secondary DDR memory controller attributes */
Dave Liu0b6bc772006-12-07 21:11:58 +0800262 u8 res2[0x378];
Dave Liufba13692006-10-31 19:25:38 -0600263} qesba83xx_t;
Dave Liufba13692006-10-31 19:25:38 -0600264
265/*
Eran Liberty9095d4a2005-07-28 10:08:46 -0500266 * DDR Memory Controller Memory Map
267 */
Dave Liufba13692006-10-31 19:25:38 -0600268typedef struct ddr_cs_bnds {
Jon Loeligerebc72242005-08-01 13:20:47 -0500269 u32 csbnds;
Dave Liufba13692006-10-31 19:25:38 -0600270 u8 res0[4];
Eran Liberty9095d4a2005-07-28 10:08:46 -0500271} ddr_cs_bnds_t;
272
Dave Liuf5035922006-10-25 14:41:21 -0500273typedef struct ddr83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800274 ddr_cs_bnds_t csbnds[4];/* Chip Select x Memory Bounds */
Jon Loeligerebc72242005-08-01 13:20:47 -0500275 u8 res0[0x60];
Dave Liu0b6bc772006-12-07 21:11:58 +0800276 u32 cs_config[4]; /* Chip Select x Configuration */
Jon Loeligerebc72242005-08-01 13:20:47 -0500277 u8 res1[0x78];
Dave Liu0b6bc772006-12-07 21:11:58 +0800278 u32 timing_cfg_1; /* SDRAM Timing Configuration 1 */
279 u32 timing_cfg_2; /* SDRAM Timing Configuration 2 */
280 u32 sdram_cfg; /* SDRAM Control Configuration */
Jon Loeligerebc72242005-08-01 13:20:47 -0500281 u8 res2[4];
Dave Liu0b6bc772006-12-07 21:11:58 +0800282 u32 sdram_mode; /* SDRAM Mode Configuration */
Jon Loeligerebc72242005-08-01 13:20:47 -0500283 u8 res3[8];
Dave Liu0b6bc772006-12-07 21:11:58 +0800284 u32 sdram_interval; /* SDRAM Interval Configuration */
Dave Liufba13692006-10-31 19:25:38 -0600285 u8 res9[8];
286 u32 sdram_clk_cntl;
Jon Loeligerebc72242005-08-01 13:20:47 -0500287 u8 res4[0xCCC];
Dave Liu0b6bc772006-12-07 21:11:58 +0800288 u32 data_err_inject_hi; /* Memory Data Path Error Injection Mask High */
289 u32 data_err_inject_lo; /* Memory Data Path Error Injection Mask Low */
290 u32 ecc_err_inject; /* Memory Data Path Error Injection Mask ECC */
Jon Loeligerebc72242005-08-01 13:20:47 -0500291 u8 res5[0x14];
Dave Liu0b6bc772006-12-07 21:11:58 +0800292 u32 capture_data_hi; /* Memory Data Path Read Capture High */
293 u32 capture_data_lo; /* Memory Data Path Read Capture Low */
294 u32 capture_ecc; /* Memory Data Path Read Capture ECC */
Jon Loeligerebc72242005-08-01 13:20:47 -0500295 u8 res6[0x14];
Dave Liu0b6bc772006-12-07 21:11:58 +0800296 u32 err_detect; /* Memory Error Detect */
297 u32 err_disable; /* Memory Error Disable */
298 u32 err_int_en; /* Memory Error Interrupt Enable */
299 u32 capture_attributes; /* Memory Error Attributes Capture */
300 u32 capture_address; /* Memory Error Address Capture */
301 u32 capture_ext_address;/* Memory Error Extended Address Capture */
302 u32 err_sbe; /* Memory Single-Bit ECC Error Management */
Jon Loeligerebc72242005-08-01 13:20:47 -0500303 u8 res7[0xA4];
Eran Liberty9095d4a2005-07-28 10:08:46 -0500304 u32 debug_reg;
Jon Loeligerebc72242005-08-01 13:20:47 -0500305 u8 res8[0xFC];
Dave Liuf5035922006-10-25 14:41:21 -0500306} ddr83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500307
308/*
Eran Liberty9095d4a2005-07-28 10:08:46 -0500309 * DUART
310 */
Dave Liufba13692006-10-31 19:25:38 -0600311typedef struct duart83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800312 u8 urbr_ulcr_udlb; /* combined register for URBR, UTHR and UDLB */
313 u8 uier_udmb; /* combined register for UIER and UDMB */
314 u8 uiir_ufcr_uafr; /* combined register for UIIR, UFCR and UAFR */
315 u8 ulcr; /* line control register */
316 u8 umcr; /* MODEM control register */
317 u8 ulsr; /* line status register */
318 u8 umsr; /* MODEM status register */
319 u8 uscr; /* scratch register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500320 u8 res0[8];
Dave Liu0b6bc772006-12-07 21:11:58 +0800321 u8 udsr; /* DMA status register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500322 u8 res1[3];
323 u8 res2[0xEC];
Dave Liuf5035922006-10-25 14:41:21 -0500324} duart83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500325
326/*
327 * Local Bus Controller Registers
328 */
Dave Liufba13692006-10-31 19:25:38 -0600329typedef struct lbus_bank {
Dave Liu0b6bc772006-12-07 21:11:58 +0800330 u32 br; /* Base Register */
331 u32 or; /* Option Register */
Eran Liberty9095d4a2005-07-28 10:08:46 -0500332} lbus_bank_t;
333
Dave Liuf5035922006-10-25 14:41:21 -0500334typedef struct lbus83xx {
Jon Loeligerebc72242005-08-01 13:20:47 -0500335 lbus_bank_t bank[8];
336 u8 res0[0x28];
Dave Liu0b6bc772006-12-07 21:11:58 +0800337 u32 mar; /* UPM Address Register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500338 u8 res1[0x4];
Dave Liu0b6bc772006-12-07 21:11:58 +0800339 u32 mamr; /* UPMA Mode Register */
340 u32 mbmr; /* UPMB Mode Register */
341 u32 mcmr; /* UPMC Mode Register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500342 u8 res2[0x8];
Dave Liu0b6bc772006-12-07 21:11:58 +0800343 u32 mrtpr; /* Memory Refresh Timer Prescaler Register */
344 u32 mdr; /* UPM Data Register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500345 u8 res3[0x8];
Dave Liu0b6bc772006-12-07 21:11:58 +0800346 u32 lsdmr; /* SDRAM Mode Register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500347 u8 res4[0x8];
Dave Liu0b6bc772006-12-07 21:11:58 +0800348 u32 lurt; /* UPM Refresh Timer */
349 u32 lsrt; /* SDRAM Refresh Timer */
Jon Loeligerebc72242005-08-01 13:20:47 -0500350 u8 res5[0x8];
Dave Liu0b6bc772006-12-07 21:11:58 +0800351 u32 ltesr; /* Transfer Error Status Register */
352 u32 ltedr; /* Transfer Error Disable Register */
353 u32 lteir; /* Transfer Error Interrupt Register */
354 u32 lteatr; /* Transfer Error Attributes Register */
355 u32 ltear; /* Transfer Error Address Register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500356 u8 res6[0xC];
Dave Liu0b6bc772006-12-07 21:11:58 +0800357 u32 lbcr; /* Configuration Register */
358 u32 lcrr; /* Clock Ratio Register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500359 u8 res7[0x28];
360 u8 res8[0xF00];
Dave Liuf5035922006-10-25 14:41:21 -0500361} lbus83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500362
363/*
364 * Serial Peripheral Interface
365 */
Dave Liufba13692006-10-31 19:25:38 -0600366typedef struct spi83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800367 u32 mode; /* mode register */
368 u32 event; /* event register */
369 u32 mask; /* mask register */
370 u32 com; /* command register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500371 u8 res0[0x10];
Dave Liu0b6bc772006-12-07 21:11:58 +0800372 u32 tx; /* transmit register */
373 u32 rx; /* receive register */
374 u8 res1[0xFD8];
Dave Liuf5035922006-10-25 14:41:21 -0500375} spi83xx_t;
Marian Balakowicz7ec9ebc2006-03-14 16:14:48 +0100376
377/*
378 * DMA/Messaging Unit
379 */
Dave Liuf5035922006-10-25 14:41:21 -0500380typedef struct dma83xx {
Dave Liufba13692006-10-31 19:25:38 -0600381 u32 res0[0xC]; /* 0x0-0x29 reseverd */
382 u32 omisr; /* 0x30 Outbound message interrupt status register */
383 u32 omimr; /* 0x34 Outbound message interrupt mask register */
384 u32 res1[0x6]; /* 0x38-0x49 reserved */
Dave Liufba13692006-10-31 19:25:38 -0600385 u32 imr0; /* 0x50 Inbound message register 0 */
386 u32 imr1; /* 0x54 Inbound message register 1 */
387 u32 omr0; /* 0x58 Outbound message register 0 */
388 u32 omr1; /* 0x5C Outbound message register 1 */
Dave Liufba13692006-10-31 19:25:38 -0600389 u32 odr; /* 0x60 Outbound doorbell register */
390 u32 res2; /* 0x64-0x67 reserved */
391 u32 idr; /* 0x68 Inbound doorbell register */
392 u32 res3[0x5]; /* 0x6C-0x79 reserved */
Dave Liufba13692006-10-31 19:25:38 -0600393 u32 imisr; /* 0x80 Inbound message interrupt status register */
394 u32 imimr; /* 0x84 Inbound message interrupt mask register */
395 u32 res4[0x1E]; /* 0x88-0x99 reserved */
Dave Liufba13692006-10-31 19:25:38 -0600396 u32 dmamr0; /* 0x100 DMA 0 mode register */
397 u32 dmasr0; /* 0x104 DMA 0 status register */
398 u32 dmacdar0; /* 0x108 DMA 0 current descriptor address register */
399 u32 res5; /* 0x10C reserved */
400 u32 dmasar0; /* 0x110 DMA 0 source address register */
401 u32 res6; /* 0x114 reserved */
402 u32 dmadar0; /* 0x118 DMA 0 destination address register */
403 u32 res7; /* 0x11C reserved */
404 u32 dmabcr0; /* 0x120 DMA 0 byte count register */
405 u32 dmandar0; /* 0x124 DMA 0 next descriptor address register */
406 u32 res8[0x16]; /* 0x128-0x179 reserved */
Dave Liufba13692006-10-31 19:25:38 -0600407 u32 dmamr1; /* 0x180 DMA 1 mode register */
408 u32 dmasr1; /* 0x184 DMA 1 status register */
409 u32 dmacdar1; /* 0x188 DMA 1 current descriptor address register */
410 u32 res9; /* 0x18C reserved */
411 u32 dmasar1; /* 0x190 DMA 1 source address register */
412 u32 res10; /* 0x194 reserved */
413 u32 dmadar1; /* 0x198 DMA 1 destination address register */
414 u32 res11; /* 0x19C reserved */
415 u32 dmabcr1; /* 0x1A0 DMA 1 byte count register */
416 u32 dmandar1; /* 0x1A4 DMA 1 next descriptor address register */
417 u32 res12[0x16]; /* 0x1A8-0x199 reserved */
Dave Liufba13692006-10-31 19:25:38 -0600418 u32 dmamr2; /* 0x200 DMA 2 mode register */
419 u32 dmasr2; /* 0x204 DMA 2 status register */
420 u32 dmacdar2; /* 0x208 DMA 2 current descriptor address register */
421 u32 res13; /* 0x20C reserved */
422 u32 dmasar2; /* 0x210 DMA 2 source address register */
423 u32 res14; /* 0x214 reserved */
424 u32 dmadar2; /* 0x218 DMA 2 destination address register */
425 u32 res15; /* 0x21C reserved */
426 u32 dmabcr2; /* 0x220 DMA 2 byte count register */
427 u32 dmandar2; /* 0x224 DMA 2 next descriptor address register */
428 u32 res16[0x16]; /* 0x228-0x279 reserved */
Dave Liufba13692006-10-31 19:25:38 -0600429 u32 dmamr3; /* 0x280 DMA 3 mode register */
430 u32 dmasr3; /* 0x284 DMA 3 status register */
431 u32 dmacdar3; /* 0x288 DMA 3 current descriptor address register */
432 u32 res17; /* 0x28C reserved */
433 u32 dmasar3; /* 0x290 DMA 3 source address register */
434 u32 res18; /* 0x294 reserved */
435 u32 dmadar3; /* 0x298 DMA 3 destination address register */
436 u32 res19; /* 0x29C reserved */
437 u32 dmabcr3; /* 0x2A0 DMA 3 byte count register */
438 u32 dmandar3; /* 0x2A4 DMA 3 next descriptor address register */
Dave Liufba13692006-10-31 19:25:38 -0600439 u32 dmagsr; /* 0x2A8 DMA general status register */
440 u32 res20[0x15]; /* 0x2AC-0x2FF reserved */
Dave Liuf5035922006-10-25 14:41:21 -0500441} dma83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500442
443/*
444 * PCI Software Configuration Registers
445 */
Dave Liuf5035922006-10-25 14:41:21 -0500446typedef struct pciconf83xx {
Dave Liufba13692006-10-31 19:25:38 -0600447 u32 config_address;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500448 u32 config_data;
449 u32 int_ack;
Dave Liufba13692006-10-31 19:25:38 -0600450 u8 res[116];
Dave Liuf5035922006-10-25 14:41:21 -0500451} pciconf83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500452
453/*
454 * PCI Outbound Translation Register
455 */
456typedef struct pci_outbound_window {
Dave Liufba13692006-10-31 19:25:38 -0600457 u32 potar;
458 u8 res0[4];
459 u32 pobar;
460 u8 res1[4];
461 u32 pocmr;
462 u8 res2[4];
Dave Liuf5035922006-10-25 14:41:21 -0500463} pot83xx_t;
Dave Liufba13692006-10-31 19:25:38 -0600464
Eran Liberty9095d4a2005-07-28 10:08:46 -0500465/*
466 * Sequencer
Jon Loeligerebc72242005-08-01 13:20:47 -0500467 */
Dave Liuf5035922006-10-25 14:41:21 -0500468typedef struct ios83xx {
Dave Liufba13692006-10-31 19:25:38 -0600469 pot83xx_t pot[6];
Dave Liufba13692006-10-31 19:25:38 -0600470 u8 res0[0x60];
471 u32 pmcr;
472 u8 res1[4];
473 u32 dtcr;
474 u8 res2[4];
Dave Liuf5035922006-10-25 14:41:21 -0500475} ios83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500476
477/*
478 * PCI Controller Control and Status Registers
479 */
Dave Liuf5035922006-10-25 14:41:21 -0500480typedef struct pcictrl83xx {
Dave Liufba13692006-10-31 19:25:38 -0600481 u32 esr;
Dave Liufba13692006-10-31 19:25:38 -0600482 u32 ecdr;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500483 u32 eer;
Dave Liufba13692006-10-31 19:25:38 -0600484 u32 eatcr;
Dave Liufba13692006-10-31 19:25:38 -0600485 u32 eacr;
486 u32 eeacr;
Dave Liufba13692006-10-31 19:25:38 -0600487 u32 edlcr;
488 u32 edhcr;
Dave Liufba13692006-10-31 19:25:38 -0600489 u32 gcr;
490 u32 ecr;
491 u32 gsr;
492 u8 res0[12];
493 u32 pitar2;
494 u8 res1[4];
495 u32 pibar2;
496 u32 piebar2;
497 u32 piwar2;
498 u8 res2[4];
499 u32 pitar1;
500 u8 res3[4];
501 u32 pibar1;
502 u32 piebar1;
503 u32 piwar1;
504 u8 res4[4];
505 u32 pitar0;
506 u8 res5[4];
507 u32 pibar0;
508 u8 res6[4];
509 u32 piwar0;
510 u8 res7[132];
Dave Liuf5035922006-10-25 14:41:21 -0500511} pcictrl83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500512
513/*
Jon Loeligerebc72242005-08-01 13:20:47 -0500514 * USB
Eran Liberty9095d4a2005-07-28 10:08:46 -0500515 */
Dave Liuf5035922006-10-25 14:41:21 -0500516typedef struct usb83xx {
Eran Liberty9095d4a2005-07-28 10:08:46 -0500517 u8 fixme[0x2000];
Dave Liuf5035922006-10-25 14:41:21 -0500518} usb83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500519
520/*
521 * TSEC
522 */
Dave Liuf5035922006-10-25 14:41:21 -0500523typedef struct tsec83xx {
Eran Liberty9095d4a2005-07-28 10:08:46 -0500524 u8 fixme[0x1000];
Dave Liuf5035922006-10-25 14:41:21 -0500525} tsec83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500526
527/*
528 * Security
529 */
Dave Liuf5035922006-10-25 14:41:21 -0500530typedef struct security83xx {
Eran Liberty9095d4a2005-07-28 10:08:46 -0500531 u8 fixme[0x10000];
Dave Liuf5035922006-10-25 14:41:21 -0500532} security83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500533
Dave Liu0b6bc772006-12-07 21:11:58 +0800534#if defined(CONFIG_MPC8349)
535typedef struct immap {
536 sysconf83xx_t sysconf; /* System configuration */
537 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
538 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
539 rtclk83xx_t pit; /* Periodic Interval Timer */
540 gtm83xx_t gtm[2]; /* Global Timers Module */
541 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
542 arbiter83xx_t arbiter; /* System Arbiter Registers */
543 reset83xx_t reset; /* Reset Module */
544 clk83xx_t clk; /* System Clock Module */
545 pmc83xx_t pmc; /* Power Management Control Module */
546 gpio83xx_t gpio[2]; /* General purpose I/O module */
547 u8 res0[0x200];
548 u8 dll_ddr[0x100];
549 u8 dll_lbc[0x100];
550 u8 res1[0xE00];
551 ddr83xx_t ddr; /* DDR Memory Controller Memory */
552 fsl_i2c_t i2c[2]; /* I2C Controllers */
553 u8 res2[0x1300];
554 duart83xx_t duart[2]; /* DUART */
555 u8 res3[0x900];
556 lbus83xx_t lbus; /* Local Bus Controller Registers */
557 u8 res4[0x1000];
558 spi83xx_t spi; /* Serial Peripheral Interface */
559 dma83xx_t dma; /* DMA */
560 pciconf83xx_t pci_conf[2]; /* PCI Software Configuration Registers */
561 ios83xx_t ios; /* Sequencer */
562 pcictrl83xx_t pci_ctrl[2]; /* PCI Controller Control and Status Registers */
563 u8 res5[0x19900];
564 usb83xx_t usb;
565 tsec83xx_t tsec[2];
566 u8 res6[0xA000];
567 security83xx_t security;
568 u8 res7[0xC0000];
569} immap_t;
Dave Liufba13692006-10-31 19:25:38 -0600570
Dave Liu0b6bc772006-12-07 21:11:58 +0800571#elif defined(CONFIG_MPC8360)
Eran Liberty9095d4a2005-07-28 10:08:46 -0500572typedef struct immap {
Dave Liu0b6bc772006-12-07 21:11:58 +0800573 sysconf83xx_t sysconf; /* System configuration */
574 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
575 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
576 rtclk83xx_t pit; /* Periodic Interval Timer */
577 u8 res0[0x200];
578 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
579 arbiter83xx_t arbiter; /* System Arbiter Registers */
580 reset83xx_t reset; /* Reset Module */
581 clk83xx_t clk; /* System Clock Module */
582 pmc83xx_t pmc; /* Power Management Control Module */
583 qepi83xx_t qepi; /* QE Ports Interrupts Registers */
584 u8 res1[0x300];
585 u8 dll_ddr[0x100];
586 u8 dll_lbc[0x100];
587 u8 res2[0x200];
588 qepio83xx_t qepio; /* QE Parallel I/O ports */
589 qesba83xx_t qesba; /* QE Secondary Bus Access Windows */
590 u8 res3[0x400];
591 ddr83xx_t ddr; /* DDR Memory Controller Memory */
592 fsl_i2c_t i2c[2]; /* I2C Controllers */
593 u8 res4[0x1300];
594 duart83xx_t duart[2]; /* DUART */
595 u8 res5[0x900];
596 lbus83xx_t lbus; /* Local Bus Controller Registers */
597 u8 res6[0x2000];
598 dma83xx_t dma; /* DMA */
599 pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */
600 u8 res7[128];
601 ios83xx_t ios; /* Sequencer (IOS) */
602 pcictrl83xx_t pci_ctrl[1]; /* PCI Controller Control and Status Registers */
603 u8 res8[0x4A00];
604 ddr83xx_t ddr_secondary; /* Secondary DDR Memory Controller Memory Map */
605 u8 res9[0x22000];
606 security83xx_t security;
607 u8 res10[0xC0000];
608 u8 qe[0x100000]; /* QE block */
Eran Liberty9095d4a2005-07-28 10:08:46 -0500609} immap_t;
Dave Liu0b6bc772006-12-07 21:11:58 +0800610#endif
Eran Liberty9095d4a2005-07-28 10:08:46 -0500611
Dave Liufba13692006-10-31 19:25:38 -0600612#endif /* __IMMAP_83xx__ */