blob: 0de93385f3f43dc8d7b1552c02422d7b9fe0276b [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 */
Dave Liue740c462006-12-07 21:13:15 +080063 u8 res6[0x0C];
64 u32 ddrcdr; /* DDR Control Driver Register */
65 u32 ddrdsr; /* DDR Debug Status Register */
66 u8 res7[0xD0];
Dave Liuf5035922006-10-25 14:41:21 -050067} sysconf83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -050068
Jon Loeligerebc72242005-08-01 13:20:47 -050069/*
Eran Liberty9095d4a2005-07-28 10:08:46 -050070 * Watch Dog Timer (WDT) Registers
71 */
Dave Liuf5035922006-10-25 14:41:21 -050072typedef struct wdt83xx {
Jon Loeligerebc72242005-08-01 13:20:47 -050073 u8 res0[4];
Dave Liufba13692006-10-31 19:25:38 -060074 u32 swcrr; /* System watchdog control register */
75 u32 swcnr; /* System watchdog count register */
Jon Loeligerebc72242005-08-01 13:20:47 -050076 u8 res1[2];
Dave Liufba13692006-10-31 19:25:38 -060077 u16 swsrr; /* System watchdog service register */
Eran Liberty9095d4a2005-07-28 10:08:46 -050078 u8 res2[0xF0];
Dave Liuf5035922006-10-25 14:41:21 -050079} wdt83xx_t;
Jon Loeligerebc72242005-08-01 13:20:47 -050080
Eran Liberty9095d4a2005-07-28 10:08:46 -050081/*
82 * RTC/PIT Module Registers
83 */
Dave Liuf5035922006-10-25 14:41:21 -050084typedef struct rtclk83xx {
Dave Liufba13692006-10-31 19:25:38 -060085 u32 cnr; /* control register */
Dave Liufba13692006-10-31 19:25:38 -060086 u32 ldr; /* load register */
Dave Liufba13692006-10-31 19:25:38 -060087 u32 psr; /* prescale register */
Dave Liu0b6bc772006-12-07 21:11:58 +080088 u32 ctr; /* counter value field register */
Dave Liufba13692006-10-31 19:25:38 -060089 u32 evr; /* event register */
Dave Liufba13692006-10-31 19:25:38 -060090 u32 alr; /* alarm register */
Eran Liberty9095d4a2005-07-28 10:08:46 -050091 u8 res0[0xE8];
Dave Liuf5035922006-10-25 14:41:21 -050092} rtclk83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -050093
94/*
Dave Liu0b6bc772006-12-07 21:11:58 +080095 * Global timer module
Eran Liberty9095d4a2005-07-28 10:08:46 -050096 */
Dave Liuf5035922006-10-25 14:41:21 -050097typedef struct gtm83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +080098 u8 cfr1; /* Timer1/2 Configuration */
Dave Liufba13692006-10-31 19:25:38 -060099 u8 res0[3];
Dave Liu0b6bc772006-12-07 21:11:58 +0800100 u8 cfr2; /* Timer3/4 Configuration */
Dave Liufba13692006-10-31 19:25:38 -0600101 u8 res1[10];
Dave Liu0b6bc772006-12-07 21:11:58 +0800102 u16 mdr1; /* Timer1 Mode Register */
103 u16 mdr2; /* Timer2 Mode Register */
104 u16 rfr1; /* Timer1 Reference Register */
105 u16 rfr2; /* Timer2 Reference Register */
106 u16 cpr1; /* Timer1 Capture Register */
107 u16 cpr2; /* Timer2 Capture Register */
108 u16 cnr1; /* Timer1 Counter Register */
109 u16 cnr2; /* Timer2 Counter Register */
110 u16 mdr3; /* Timer3 Mode Register */
111 u16 mdr4; /* Timer4 Mode Register */
112 u16 rfr3; /* Timer3 Reference Register */
113 u16 rfr4; /* Timer4 Reference Register */
114 u16 cpr3; /* Timer3 Capture Register */
115 u16 cpr4; /* Timer4 Capture Register */
116 u16 cnr3; /* Timer3 Counter Register */
117 u16 cnr4; /* Timer4 Counter Register */
118 u16 evr1; /* Timer1 Event Register */
119 u16 evr2; /* Timer2 Event Register */
120 u16 evr3; /* Timer3 Event Register */
121 u16 evr4; /* Timer4 Event Register */
122 u16 psr1; /* Timer1 Prescaler Register */
123 u16 psr2; /* Timer2 Prescaler Register */
124 u16 psr3; /* Timer3 Prescaler Register */
125 u16 psr4; /* Timer4 Prescaler Register */
Dave Liufba13692006-10-31 19:25:38 -0600126 u8 res[0xC0];
Dave Liuf5035922006-10-25 14:41:21 -0500127} gtm83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500128
129/*
130 * Integrated Programmable Interrupt Controller
131 */
Dave Liuf5035922006-10-25 14:41:21 -0500132typedef struct ipic83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800133 u32 sicfr; /* System Global Interrupt Configuration Register */
134 u32 sivcr; /* System Global Interrupt Vector Register */
135 u32 sipnr_h; /* System Internal Interrupt Pending Register - High */
136 u32 sipnr_l; /* System Internal Interrupt Pending Register - Low */
137 u32 siprr_a; /* System Internal Interrupt Group A Priority Register */
Dave Liufba13692006-10-31 19:25:38 -0600138 u8 res0[8];
Dave Liu0b6bc772006-12-07 21:11:58 +0800139 u32 siprr_d; /* System Internal Interrupt Group D Priority Register */
140 u32 simsr_h; /* System Internal Interrupt Mask Register - High */
141 u32 simsr_l; /* System Internal Interrupt Mask Register - Low */
Dave Liufba13692006-10-31 19:25:38 -0600142 u8 res1[4];
Dave Liu0b6bc772006-12-07 21:11:58 +0800143 u32 sepnr; /* System External Interrupt Pending Register */
144 u32 smprr_a; /* System Mixed Interrupt Group A Priority Register */
145 u32 smprr_b; /* System Mixed Interrupt Group B Priority Register */
146 u32 semsr; /* System External Interrupt Mask Register */
147 u32 secnr; /* System External Interrupt Control Register */
148 u32 sersr; /* System Error Status Register */
149 u32 sermr; /* System Error Mask Register */
150 u32 sercr; /* System Error Control Register */
Dave Liufba13692006-10-31 19:25:38 -0600151 u8 res2[4];
Dave Liu0b6bc772006-12-07 21:11:58 +0800152 u32 sifcr_h; /* System Internal Interrupt Force Register - High */
153 u32 sifcr_l; /* System Internal Interrupt Force Register - Low */
154 u32 sefcr; /* System External Interrupt Force Register */
155 u32 serfr; /* System Error Force Register */
Dave Liufba13692006-10-31 19:25:38 -0600156 u32 scvcr; /* System Critical Interrupt Vector Register */
Dave Liufba13692006-10-31 19:25:38 -0600157 u32 smvcr; /* System Management Interrupt Vector Register */
Dave Liufba13692006-10-31 19:25:38 -0600158 u8 res3[0x98];
Dave Liuf5035922006-10-25 14:41:21 -0500159} ipic83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500160
161/*
162 * System Arbiter Registers
163 */
Dave Liuf5035922006-10-25 14:41:21 -0500164typedef struct arbiter83xx {
Dave Liufba13692006-10-31 19:25:38 -0600165 u32 acr; /* Arbiter Configuration Register */
Dave Liufba13692006-10-31 19:25:38 -0600166 u32 atr; /* Arbiter Timers Register */
Eran Liberty9095d4a2005-07-28 10:08:46 -0500167 u8 res[4];
Dave Liu0b6bc772006-12-07 21:11:58 +0800168 u32 aer; /* Arbiter Event Register */
169 u32 aidr; /* Arbiter Interrupt Definition Register */
170 u32 amr; /* Arbiter Mask Register */
Dave Liufba13692006-10-31 19:25:38 -0600171 u32 aeatr; /* Arbiter Event Attributes Register */
Dave Liufba13692006-10-31 19:25:38 -0600172 u32 aeadr; /* Arbiter Event Address Register */
Dave Liu0b6bc772006-12-07 21:11:58 +0800173 u32 aerr; /* Arbiter Event Response Register */
Eran Liberty9095d4a2005-07-28 10:08:46 -0500174 u8 res1[0xDC];
Dave Liuf5035922006-10-25 14:41:21 -0500175} arbiter83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500176
177/*
178 * Reset Module
179 */
Dave Liuf5035922006-10-25 14:41:21 -0500180typedef struct reset83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800181 u32 rcwl; /* Reset Configuration Word Low Register */
182 u32 rcwh; /* Reset Configuration Word High Register */
Dave Liufba13692006-10-31 19:25:38 -0600183 u8 res0[8];
Dave Liu0b6bc772006-12-07 21:11:58 +0800184 u32 rsr; /* Reset Status Register */
185 u32 rmr; /* Reset Mode Register */
186 u32 rpr; /* Reset protection Register */
187 u32 rcr; /* Reset Control Register */
188 u32 rcer; /* Reset Control Enable Register */
Dave Liufba13692006-10-31 19:25:38 -0600189 u8 res1[0xDC];
Dave Liuf5035922006-10-25 14:41:21 -0500190} reset83xx_t;
Jon Loeligerebc72242005-08-01 13:20:47 -0500191
Dave Liu0b6bc772006-12-07 21:11:58 +0800192/*
193 * Clock Module
194 */
Dave Liuf5035922006-10-25 14:41:21 -0500195typedef struct clk83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800196 u32 spmr; /* system PLL mode Register */
197 u32 occr; /* output clock control Register */
198 u32 sccr; /* system clock control Register */
Dave Liufba13692006-10-31 19:25:38 -0600199 u8 res0[0xF4];
Dave Liuf5035922006-10-25 14:41:21 -0500200} clk83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500201
202/*
203 * Power Management Control Module
204 */
Dave Liuf5035922006-10-25 14:41:21 -0500205typedef struct pmc83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800206 u32 pmccr; /* PMC Configuration Register */
207 u32 pmcer; /* PMC Event Register */
208 u32 pmcmr; /* PMC Mask Register */
Scott Wood9f15d502007-04-16 14:31:55 -0500209 u32 pmccr1; /* PMC Configuration Register 1 */
210 u32 pmccr2; /* PMC Configuration Register 2 */
211 u8 res0[0xEC];
Dave Liuf5035922006-10-25 14:41:21 -0500212} pmc83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500213
214/*
Dave Liu0b6bc772006-12-07 21:11:58 +0800215 * General purpose I/O module
Eran Liberty9095d4a2005-07-28 10:08:46 -0500216 */
Dave Liuf5035922006-10-25 14:41:21 -0500217typedef struct gpio83xx {
Dave Liufba13692006-10-31 19:25:38 -0600218 u32 dir; /* direction register */
219 u32 odr; /* open drain register */
220 u32 dat; /* data register */
221 u32 ier; /* interrupt event register */
222 u32 imr; /* interrupt mask register */
223 u32 icr; /* external interrupt control register */
Eran Liberty9095d4a2005-07-28 10:08:46 -0500224 u8 res0[0xE8];
Dave Liuf5035922006-10-25 14:41:21 -0500225} gpio83xx_t;
Dave Liufba13692006-10-31 19:25:38 -0600226
Dave Liufba13692006-10-31 19:25:38 -0600227/*
228 * QE Ports Interrupts Registers
229 */
230typedef struct qepi83xx {
231 u8 res0[0xC];
232 u32 qepier; /* QE Ports Interrupt Event Register */
Dave Liufba13692006-10-31 19:25:38 -0600233 u32 qepimr; /* QE Ports Interrupt Mask Register */
Dave Liufba13692006-10-31 19:25:38 -0600234 u32 qepicr; /* QE Ports Interrupt Control Register */
Dave Liufba13692006-10-31 19:25:38 -0600235 u8 res1[0xE8];
236} qepi83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500237
Jon Loeligerebc72242005-08-01 13:20:47 -0500238/*
Dave Liu0b6bc772006-12-07 21:11:58 +0800239 * QE Parallel I/O Ports
Dave Liufba13692006-10-31 19:25:38 -0600240 */
241typedef struct gpio_n {
242 u32 podr; /* Open Drain Register */
243 u32 pdat; /* Data Register */
244 u32 dir1; /* direction register 1 */
245 u32 dir2; /* direction register 2 */
246 u32 ppar1; /* Pin Assignment Register 1 */
247 u32 ppar2; /* Pin Assignment Register 2 */
248} gpio_n_t;
249
Dave Liu0b6bc772006-12-07 21:11:58 +0800250typedef struct qegpio83xx {
Dave Liufba13692006-10-31 19:25:38 -0600251 gpio_n_t ioport[0x7];
252 u8 res0[0x358];
Dave Liu0b6bc772006-12-07 21:11:58 +0800253} qepio83xx_t;
Dave Liufba13692006-10-31 19:25:38 -0600254
255/*
256 * QE Secondary Bus Access Windows
257 */
Dave Liufba13692006-10-31 19:25:38 -0600258typedef struct qesba83xx {
259 u32 lbmcsar; /* Local bus memory controller start address */
Dave Liufba13692006-10-31 19:25:38 -0600260 u32 sdmcsar; /* Secondary DDR memory controller start address */
Dave Liufba13692006-10-31 19:25:38 -0600261 u8 res0[0x38];
262 u32 lbmcear; /* Local bus memory controller end address */
Dave Liufba13692006-10-31 19:25:38 -0600263 u32 sdmcear; /* Secondary DDR memory controller end address */
Dave Liufba13692006-10-31 19:25:38 -0600264 u8 res1[0x38];
Dave Liu0b6bc772006-12-07 21:11:58 +0800265 u32 lbmcar; /* Local bus memory controller attributes */
Dave Liufba13692006-10-31 19:25:38 -0600266 u32 sdmcar; /* Secondary DDR memory controller attributes */
Dave Liu0b6bc772006-12-07 21:11:58 +0800267 u8 res2[0x378];
Dave Liufba13692006-10-31 19:25:38 -0600268} qesba83xx_t;
Dave Liufba13692006-10-31 19:25:38 -0600269
270/*
Eran Liberty9095d4a2005-07-28 10:08:46 -0500271 * DDR Memory Controller Memory Map
272 */
Dave Liufba13692006-10-31 19:25:38 -0600273typedef struct ddr_cs_bnds {
Jon Loeligerebc72242005-08-01 13:20:47 -0500274 u32 csbnds;
Dave Liufba13692006-10-31 19:25:38 -0600275 u8 res0[4];
Eran Liberty9095d4a2005-07-28 10:08:46 -0500276} ddr_cs_bnds_t;
277
Dave Liuf5035922006-10-25 14:41:21 -0500278typedef struct ddr83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800279 ddr_cs_bnds_t csbnds[4];/* Chip Select x Memory Bounds */
Jon Loeligerebc72242005-08-01 13:20:47 -0500280 u8 res0[0x60];
Dave Liu0b6bc772006-12-07 21:11:58 +0800281 u32 cs_config[4]; /* Chip Select x Configuration */
Dave Liue740c462006-12-07 21:13:15 +0800282 u8 res1[0x70];
283 u32 timing_cfg_3; /* SDRAM Timing Configuration 3 */
284 u32 timing_cfg_0; /* SDRAM Timing Configuration 0 */
Dave Liu0b6bc772006-12-07 21:11:58 +0800285 u32 timing_cfg_1; /* SDRAM Timing Configuration 1 */
286 u32 timing_cfg_2; /* SDRAM Timing Configuration 2 */
287 u32 sdram_cfg; /* SDRAM Control Configuration */
Dave Liue740c462006-12-07 21:13:15 +0800288 u32 sdram_cfg2; /* SDRAM Control Configuration 2 */
Dave Liu0b6bc772006-12-07 21:11:58 +0800289 u32 sdram_mode; /* SDRAM Mode Configuration */
Dave Liue740c462006-12-07 21:13:15 +0800290 u32 sdram_mode2; /* SDRAM Mode Configuration 2 */
291 u32 sdram_md_cntl; /* SDRAM Mode Control */
Dave Liu0b6bc772006-12-07 21:11:58 +0800292 u32 sdram_interval; /* SDRAM Interval Configuration */
Dave Liue740c462006-12-07 21:13:15 +0800293 u32 ddr_data_init; /* SDRAM Data Initialization */
294 u8 res2[4];
295 u32 sdram_clk_cntl; /* SDRAM Clock Control */
296 u8 res3[0x14];
297 u32 ddr_init_addr; /* DDR training initialization address */
298 u32 ddr_init_ext_addr; /* DDR training initialization extended address */
299 u8 res4[0xAA8];
300 u32 ddr_ip_rev1; /* DDR IP block revision 1 */
301 u32 ddr_ip_rev2; /* DDR IP block revision 2 */
302 u8 res5[0x200];
Dave Liu0b6bc772006-12-07 21:11:58 +0800303 u32 data_err_inject_hi; /* Memory Data Path Error Injection Mask High */
304 u32 data_err_inject_lo; /* Memory Data Path Error Injection Mask Low */
305 u32 ecc_err_inject; /* Memory Data Path Error Injection Mask ECC */
Dave Liue740c462006-12-07 21:13:15 +0800306 u8 res6[0x14];
Dave Liu0b6bc772006-12-07 21:11:58 +0800307 u32 capture_data_hi; /* Memory Data Path Read Capture High */
308 u32 capture_data_lo; /* Memory Data Path Read Capture Low */
309 u32 capture_ecc; /* Memory Data Path Read Capture ECC */
Dave Liue740c462006-12-07 21:13:15 +0800310 u8 res7[0x14];
Dave Liu0b6bc772006-12-07 21:11:58 +0800311 u32 err_detect; /* Memory Error Detect */
312 u32 err_disable; /* Memory Error Disable */
313 u32 err_int_en; /* Memory Error Interrupt Enable */
314 u32 capture_attributes; /* Memory Error Attributes Capture */
315 u32 capture_address; /* Memory Error Address Capture */
316 u32 capture_ext_address;/* Memory Error Extended Address Capture */
317 u32 err_sbe; /* Memory Single-Bit ECC Error Management */
Dave Liue740c462006-12-07 21:13:15 +0800318 u8 res8[0xA4];
Eran Liberty9095d4a2005-07-28 10:08:46 -0500319 u32 debug_reg;
Dave Liue740c462006-12-07 21:13:15 +0800320 u8 res9[0xFC];
Dave Liuf5035922006-10-25 14:41:21 -0500321} ddr83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500322
323/*
Eran Liberty9095d4a2005-07-28 10:08:46 -0500324 * DUART
325 */
Dave Liufba13692006-10-31 19:25:38 -0600326typedef struct duart83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800327 u8 urbr_ulcr_udlb; /* combined register for URBR, UTHR and UDLB */
328 u8 uier_udmb; /* combined register for UIER and UDMB */
329 u8 uiir_ufcr_uafr; /* combined register for UIIR, UFCR and UAFR */
330 u8 ulcr; /* line control register */
331 u8 umcr; /* MODEM control register */
332 u8 ulsr; /* line status register */
333 u8 umsr; /* MODEM status register */
334 u8 uscr; /* scratch register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500335 u8 res0[8];
Dave Liu0b6bc772006-12-07 21:11:58 +0800336 u8 udsr; /* DMA status register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500337 u8 res1[3];
338 u8 res2[0xEC];
Dave Liuf5035922006-10-25 14:41:21 -0500339} duart83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500340
341/*
342 * Local Bus Controller Registers
343 */
Dave Liufba13692006-10-31 19:25:38 -0600344typedef struct lbus_bank {
Dave Liu0b6bc772006-12-07 21:11:58 +0800345 u32 br; /* Base Register */
346 u32 or; /* Option Register */
Eran Liberty9095d4a2005-07-28 10:08:46 -0500347} lbus_bank_t;
348
Dave Liuf5035922006-10-25 14:41:21 -0500349typedef struct lbus83xx {
Jon Loeligerebc72242005-08-01 13:20:47 -0500350 lbus_bank_t bank[8];
351 u8 res0[0x28];
Dave Liu0b6bc772006-12-07 21:11:58 +0800352 u32 mar; /* UPM Address Register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500353 u8 res1[0x4];
Dave Liu0b6bc772006-12-07 21:11:58 +0800354 u32 mamr; /* UPMA Mode Register */
355 u32 mbmr; /* UPMB Mode Register */
356 u32 mcmr; /* UPMC Mode Register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500357 u8 res2[0x8];
Dave Liu0b6bc772006-12-07 21:11:58 +0800358 u32 mrtpr; /* Memory Refresh Timer Prescaler Register */
359 u32 mdr; /* UPM Data Register */
Scott Wood9f15d502007-04-16 14:31:55 -0500360 u8 res3[0x4];
361 u32 lsor; /* Special Operation Initiation Register */
Dave Liu0b6bc772006-12-07 21:11:58 +0800362 u32 lsdmr; /* SDRAM Mode Register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500363 u8 res4[0x8];
Dave Liu0b6bc772006-12-07 21:11:58 +0800364 u32 lurt; /* UPM Refresh Timer */
365 u32 lsrt; /* SDRAM Refresh Timer */
Jon Loeligerebc72242005-08-01 13:20:47 -0500366 u8 res5[0x8];
Dave Liu0b6bc772006-12-07 21:11:58 +0800367 u32 ltesr; /* Transfer Error Status Register */
368 u32 ltedr; /* Transfer Error Disable Register */
369 u32 lteir; /* Transfer Error Interrupt Register */
370 u32 lteatr; /* Transfer Error Attributes Register */
371 u32 ltear; /* Transfer Error Address Register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500372 u8 res6[0xC];
Dave Liu0b6bc772006-12-07 21:11:58 +0800373 u32 lbcr; /* Configuration Register */
374 u32 lcrr; /* Clock Ratio Register */
Scott Wood9f15d502007-04-16 14:31:55 -0500375 u8 res7[0x8];
376 u32 fmr; /* Flash Mode Register */
377 u32 fir; /* Flash Instruction Register */
378 u32 fcr; /* Flash Command Register */
379 u32 fbar; /* Flash Block Addr Register */
380 u32 fpar; /* Flash Page Addr Register */
381 u32 fbcr; /* Flash Byte Count Register */
382 u8 res8[0xF08];
Dave Liuf5035922006-10-25 14:41:21 -0500383} lbus83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500384
385/*
386 * Serial Peripheral Interface
387 */
Dave Liufba13692006-10-31 19:25:38 -0600388typedef struct spi83xx {
Dave Liu0b6bc772006-12-07 21:11:58 +0800389 u32 mode; /* mode register */
390 u32 event; /* event register */
391 u32 mask; /* mask register */
392 u32 com; /* command register */
Jon Loeligerebc72242005-08-01 13:20:47 -0500393 u8 res0[0x10];
Dave Liu0b6bc772006-12-07 21:11:58 +0800394 u32 tx; /* transmit register */
395 u32 rx; /* receive register */
396 u8 res1[0xFD8];
Dave Liuf5035922006-10-25 14:41:21 -0500397} spi83xx_t;
Marian Balakowicz7ec9ebc2006-03-14 16:14:48 +0100398
399/*
400 * DMA/Messaging Unit
401 */
Dave Liuf5035922006-10-25 14:41:21 -0500402typedef struct dma83xx {
Dave Liufba13692006-10-31 19:25:38 -0600403 u32 res0[0xC]; /* 0x0-0x29 reseverd */
404 u32 omisr; /* 0x30 Outbound message interrupt status register */
405 u32 omimr; /* 0x34 Outbound message interrupt mask register */
406 u32 res1[0x6]; /* 0x38-0x49 reserved */
Dave Liufba13692006-10-31 19:25:38 -0600407 u32 imr0; /* 0x50 Inbound message register 0 */
408 u32 imr1; /* 0x54 Inbound message register 1 */
409 u32 omr0; /* 0x58 Outbound message register 0 */
410 u32 omr1; /* 0x5C Outbound message register 1 */
Dave Liufba13692006-10-31 19:25:38 -0600411 u32 odr; /* 0x60 Outbound doorbell register */
412 u32 res2; /* 0x64-0x67 reserved */
413 u32 idr; /* 0x68 Inbound doorbell register */
414 u32 res3[0x5]; /* 0x6C-0x79 reserved */
Dave Liufba13692006-10-31 19:25:38 -0600415 u32 imisr; /* 0x80 Inbound message interrupt status register */
416 u32 imimr; /* 0x84 Inbound message interrupt mask register */
417 u32 res4[0x1E]; /* 0x88-0x99 reserved */
Dave Liufba13692006-10-31 19:25:38 -0600418 u32 dmamr0; /* 0x100 DMA 0 mode register */
419 u32 dmasr0; /* 0x104 DMA 0 status register */
420 u32 dmacdar0; /* 0x108 DMA 0 current descriptor address register */
421 u32 res5; /* 0x10C reserved */
422 u32 dmasar0; /* 0x110 DMA 0 source address register */
423 u32 res6; /* 0x114 reserved */
424 u32 dmadar0; /* 0x118 DMA 0 destination address register */
425 u32 res7; /* 0x11C reserved */
426 u32 dmabcr0; /* 0x120 DMA 0 byte count register */
427 u32 dmandar0; /* 0x124 DMA 0 next descriptor address register */
428 u32 res8[0x16]; /* 0x128-0x179 reserved */
Dave Liufba13692006-10-31 19:25:38 -0600429 u32 dmamr1; /* 0x180 DMA 1 mode register */
430 u32 dmasr1; /* 0x184 DMA 1 status register */
431 u32 dmacdar1; /* 0x188 DMA 1 current descriptor address register */
432 u32 res9; /* 0x18C reserved */
433 u32 dmasar1; /* 0x190 DMA 1 source address register */
434 u32 res10; /* 0x194 reserved */
435 u32 dmadar1; /* 0x198 DMA 1 destination address register */
436 u32 res11; /* 0x19C reserved */
437 u32 dmabcr1; /* 0x1A0 DMA 1 byte count register */
438 u32 dmandar1; /* 0x1A4 DMA 1 next descriptor address register */
439 u32 res12[0x16]; /* 0x1A8-0x199 reserved */
Dave Liufba13692006-10-31 19:25:38 -0600440 u32 dmamr2; /* 0x200 DMA 2 mode register */
441 u32 dmasr2; /* 0x204 DMA 2 status register */
442 u32 dmacdar2; /* 0x208 DMA 2 current descriptor address register */
443 u32 res13; /* 0x20C reserved */
444 u32 dmasar2; /* 0x210 DMA 2 source address register */
445 u32 res14; /* 0x214 reserved */
446 u32 dmadar2; /* 0x218 DMA 2 destination address register */
447 u32 res15; /* 0x21C reserved */
448 u32 dmabcr2; /* 0x220 DMA 2 byte count register */
449 u32 dmandar2; /* 0x224 DMA 2 next descriptor address register */
450 u32 res16[0x16]; /* 0x228-0x279 reserved */
Dave Liufba13692006-10-31 19:25:38 -0600451 u32 dmamr3; /* 0x280 DMA 3 mode register */
452 u32 dmasr3; /* 0x284 DMA 3 status register */
453 u32 dmacdar3; /* 0x288 DMA 3 current descriptor address register */
454 u32 res17; /* 0x28C reserved */
455 u32 dmasar3; /* 0x290 DMA 3 source address register */
456 u32 res18; /* 0x294 reserved */
457 u32 dmadar3; /* 0x298 DMA 3 destination address register */
458 u32 res19; /* 0x29C reserved */
459 u32 dmabcr3; /* 0x2A0 DMA 3 byte count register */
460 u32 dmandar3; /* 0x2A4 DMA 3 next descriptor address register */
Dave Liufba13692006-10-31 19:25:38 -0600461 u32 dmagsr; /* 0x2A8 DMA general status register */
462 u32 res20[0x15]; /* 0x2AC-0x2FF reserved */
Dave Liuf5035922006-10-25 14:41:21 -0500463} dma83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500464
465/*
466 * PCI Software Configuration Registers
467 */
Dave Liuf5035922006-10-25 14:41:21 -0500468typedef struct pciconf83xx {
Dave Liufba13692006-10-31 19:25:38 -0600469 u32 config_address;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500470 u32 config_data;
471 u32 int_ack;
Dave Liufba13692006-10-31 19:25:38 -0600472 u8 res[116];
Dave Liuf5035922006-10-25 14:41:21 -0500473} pciconf83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500474
475/*
476 * PCI Outbound Translation Register
477 */
478typedef struct pci_outbound_window {
Dave Liufba13692006-10-31 19:25:38 -0600479 u32 potar;
480 u8 res0[4];
481 u32 pobar;
482 u8 res1[4];
483 u32 pocmr;
484 u8 res2[4];
Dave Liuf5035922006-10-25 14:41:21 -0500485} pot83xx_t;
Dave Liufba13692006-10-31 19:25:38 -0600486
Eran Liberty9095d4a2005-07-28 10:08:46 -0500487/*
488 * Sequencer
Jon Loeligerebc72242005-08-01 13:20:47 -0500489 */
Dave Liuf5035922006-10-25 14:41:21 -0500490typedef struct ios83xx {
Dave Liufba13692006-10-31 19:25:38 -0600491 pot83xx_t pot[6];
Dave Liufba13692006-10-31 19:25:38 -0600492 u8 res0[0x60];
493 u32 pmcr;
494 u8 res1[4];
495 u32 dtcr;
496 u8 res2[4];
Dave Liuf5035922006-10-25 14:41:21 -0500497} ios83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500498
499/*
500 * PCI Controller Control and Status Registers
501 */
Dave Liuf5035922006-10-25 14:41:21 -0500502typedef struct pcictrl83xx {
Dave Liufba13692006-10-31 19:25:38 -0600503 u32 esr;
Dave Liufba13692006-10-31 19:25:38 -0600504 u32 ecdr;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500505 u32 eer;
Dave Liufba13692006-10-31 19:25:38 -0600506 u32 eatcr;
Dave Liufba13692006-10-31 19:25:38 -0600507 u32 eacr;
508 u32 eeacr;
Dave Liufba13692006-10-31 19:25:38 -0600509 u32 edlcr;
510 u32 edhcr;
Dave Liufba13692006-10-31 19:25:38 -0600511 u32 gcr;
512 u32 ecr;
513 u32 gsr;
514 u8 res0[12];
515 u32 pitar2;
516 u8 res1[4];
517 u32 pibar2;
518 u32 piebar2;
519 u32 piwar2;
520 u8 res2[4];
521 u32 pitar1;
522 u8 res3[4];
523 u32 pibar1;
524 u32 piebar1;
525 u32 piwar1;
526 u8 res4[4];
527 u32 pitar0;
528 u8 res5[4];
529 u32 pibar0;
530 u8 res6[4];
531 u32 piwar0;
532 u8 res7[132];
Dave Liuf5035922006-10-25 14:41:21 -0500533} pcictrl83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500534
535/*
Jon Loeligerebc72242005-08-01 13:20:47 -0500536 * USB
Eran Liberty9095d4a2005-07-28 10:08:46 -0500537 */
Dave Liuf5035922006-10-25 14:41:21 -0500538typedef struct usb83xx {
Scott Wood9f15d502007-04-16 14:31:55 -0500539 u8 fixme[0x1000];
Dave Liuf5035922006-10-25 14:41:21 -0500540} usb83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500541
542/*
543 * TSEC
544 */
Dave Liuf5035922006-10-25 14:41:21 -0500545typedef struct tsec83xx {
Eran Liberty9095d4a2005-07-28 10:08:46 -0500546 u8 fixme[0x1000];
Dave Liuf5035922006-10-25 14:41:21 -0500547} tsec83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500548
549/*
550 * Security
551 */
Dave Liuf5035922006-10-25 14:41:21 -0500552typedef struct security83xx {
Eran Liberty9095d4a2005-07-28 10:08:46 -0500553 u8 fixme[0x10000];
Dave Liuf5035922006-10-25 14:41:21 -0500554} security83xx_t;
Eran Liberty9095d4a2005-07-28 10:08:46 -0500555
Kumar Galab7870e72007-01-30 14:08:30 -0600556#if defined(CONFIG_MPC834X)
Dave Liu0b6bc772006-12-07 21:11:58 +0800557typedef struct immap {
558 sysconf83xx_t sysconf; /* System configuration */
559 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
560 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
561 rtclk83xx_t pit; /* Periodic Interval Timer */
562 gtm83xx_t gtm[2]; /* Global Timers Module */
563 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
564 arbiter83xx_t arbiter; /* System Arbiter Registers */
565 reset83xx_t reset; /* Reset Module */
566 clk83xx_t clk; /* System Clock Module */
567 pmc83xx_t pmc; /* Power Management Control Module */
568 gpio83xx_t gpio[2]; /* General purpose I/O module */
569 u8 res0[0x200];
570 u8 dll_ddr[0x100];
571 u8 dll_lbc[0x100];
572 u8 res1[0xE00];
573 ddr83xx_t ddr; /* DDR Memory Controller Memory */
574 fsl_i2c_t i2c[2]; /* I2C Controllers */
575 u8 res2[0x1300];
576 duart83xx_t duart[2]; /* DUART */
577 u8 res3[0x900];
578 lbus83xx_t lbus; /* Local Bus Controller Registers */
579 u8 res4[0x1000];
580 spi83xx_t spi; /* Serial Peripheral Interface */
581 dma83xx_t dma; /* DMA */
582 pciconf83xx_t pci_conf[2]; /* PCI Software Configuration Registers */
583 ios83xx_t ios; /* Sequencer */
584 pcictrl83xx_t pci_ctrl[2]; /* PCI Controller Control and Status Registers */
585 u8 res5[0x19900];
Scott Wood9f15d502007-04-16 14:31:55 -0500586 usb83xx_t usb[2];
587 tsec83xx_t tsec[2];
588 u8 res6[0xA000];
589 security83xx_t security;
590 u8 res7[0xC0000];
591} immap_t;
592
593#elif defined(CONFIG_MPC831X)
594typedef struct immap {
595 sysconf83xx_t sysconf; /* System configuration */
596 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
597 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
598 rtclk83xx_t pit; /* Periodic Interval Timer */
599 gtm83xx_t gtm[2]; /* Global Timers Module */
600 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
601 arbiter83xx_t arbiter; /* System Arbiter Registers */
602 reset83xx_t reset; /* Reset Module */
603 clk83xx_t clk; /* System Clock Module */
604 pmc83xx_t pmc; /* Power Management Control Module */
605 gpio83xx_t gpio[1]; /* General purpose I/O module */
606 u8 res0[0x1300];
607 ddr83xx_t ddr; /* DDR Memory Controller Memory */
608 fsl_i2c_t i2c[2]; /* I2C Controllers */
609 u8 res1[0x1300];
610 duart83xx_t duart[2]; /* DUART */
611 u8 res2[0x900];
612 lbus83xx_t lbus; /* Local Bus Controller Registers */
613 u8 res3[0x1000];
614 spi83xx_t spi; /* Serial Peripheral Interface */
615 dma83xx_t dma; /* DMA */
616 pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */
617 u8 res4[0x80];
618 ios83xx_t ios; /* Sequencer */
619 pcictrl83xx_t pci_ctrl[1]; /* PCI Controller Control and Status Registers */
620 u8 res5[0x1aa00];
621 usb83xx_t usb[1];
Dave Liu0b6bc772006-12-07 21:11:58 +0800622 tsec83xx_t tsec[2];
623 u8 res6[0xA000];
624 security83xx_t security;
625 u8 res7[0xC0000];
626} immap_t;
Dave Liufba13692006-10-31 19:25:38 -0600627
Dave Liu0b6bc772006-12-07 21:11:58 +0800628#elif defined(CONFIG_MPC8360)
Eran Liberty9095d4a2005-07-28 10:08:46 -0500629typedef struct immap {
Dave Liu0b6bc772006-12-07 21:11:58 +0800630 sysconf83xx_t sysconf; /* System configuration */
631 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
632 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
633 rtclk83xx_t pit; /* Periodic Interval Timer */
634 u8 res0[0x200];
635 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
636 arbiter83xx_t arbiter; /* System Arbiter Registers */
637 reset83xx_t reset; /* Reset Module */
638 clk83xx_t clk; /* System Clock Module */
639 pmc83xx_t pmc; /* Power Management Control Module */
640 qepi83xx_t qepi; /* QE Ports Interrupts Registers */
641 u8 res1[0x300];
642 u8 dll_ddr[0x100];
643 u8 dll_lbc[0x100];
644 u8 res2[0x200];
645 qepio83xx_t qepio; /* QE Parallel I/O ports */
646 qesba83xx_t qesba; /* QE Secondary Bus Access Windows */
647 u8 res3[0x400];
648 ddr83xx_t ddr; /* DDR Memory Controller Memory */
649 fsl_i2c_t i2c[2]; /* I2C Controllers */
650 u8 res4[0x1300];
651 duart83xx_t duart[2]; /* DUART */
652 u8 res5[0x900];
653 lbus83xx_t lbus; /* Local Bus Controller Registers */
654 u8 res6[0x2000];
655 dma83xx_t dma; /* DMA */
656 pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */
657 u8 res7[128];
658 ios83xx_t ios; /* Sequencer (IOS) */
659 pcictrl83xx_t pci_ctrl[1]; /* PCI Controller Control and Status Registers */
660 u8 res8[0x4A00];
661 ddr83xx_t ddr_secondary; /* Secondary DDR Memory Controller Memory Map */
662 u8 res9[0x22000];
663 security83xx_t security;
664 u8 res10[0xC0000];
665 u8 qe[0x100000]; /* QE block */
Eran Liberty9095d4a2005-07-28 10:08:46 -0500666} immap_t;
Dave Liue740c462006-12-07 21:13:15 +0800667
668#elif defined(CONFIG_MPC832X)
669typedef struct immap {
670 sysconf83xx_t sysconf; /* System configuration */
671 wdt83xx_t wdt; /* Watch Dog Timer (WDT) Registers */
672 rtclk83xx_t rtc; /* Real Time Clock Module Registers */
673 rtclk83xx_t pit; /* Periodic Interval Timer */
674 gtm83xx_t gtm[2]; /* Global Timers Module */
675 ipic83xx_t ipic; /* Integrated Programmable Interrupt Controller */
676 arbiter83xx_t arbiter; /* System Arbiter Registers */
677 reset83xx_t reset; /* Reset Module */
678 clk83xx_t clk; /* System Clock Module */
679 pmc83xx_t pmc; /* Power Management Control Module */
680 qepi83xx_t qepi; /* QE Ports Interrupts Registers */
681 u8 res0[0x300];
682 u8 dll_ddr[0x100];
683 u8 dll_lbc[0x100];
684 u8 res1[0x200];
685 qepio83xx_t qepio; /* QE Parallel I/O ports */
686 u8 res2[0x800];
687 ddr83xx_t ddr; /* DDR Memory Controller Memory */
688 fsl_i2c_t i2c[2]; /* I2C Controllers */
689 u8 res3[0x1300];
690 duart83xx_t duart[2]; /* DUART */
691 u8 res4[0x900];
692 lbus83xx_t lbus; /* Local Bus Controller Registers */
693 u8 res5[0x2000];
694 dma83xx_t dma; /* DMA */
695 pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */
696 u8 res6[128];
697 ios83xx_t ios; /* Sequencer (IOS) */
698 pcictrl83xx_t pci_ctrl[1]; /* PCI Controller Control and Status Registers */
699 u8 res7[0x27A00];
700 security83xx_t security;
701 u8 res8[0xC0000];
702 u8 qe[0x100000]; /* QE block */
703} immap_t;
Dave Liu0b6bc772006-12-07 21:11:58 +0800704#endif
Eran Liberty9095d4a2005-07-28 10:08:46 -0500705
Dave Liufba13692006-10-31 19:25:38 -0600706#endif /* __IMMAP_83xx__ */