2 * MPC8220 Internal Memory Map
3 * Copyright (c) 2004 TsiChung Liew (Tsi-Chung.Liew@freescale.com)
5 * The Internal Memory Map of the 8220.
8 #ifndef __IMMAP_MPC8220__
9 #define __IMMAP_MPC8220__
12 * System configuration registers.
14 typedef struct sys_conf {
21 u32 res3[6]; /* 0x08 */
23 u32 cscfg[6]; /* 0x20 */
25 u32 res4[2]; /* 0x38 */
27 u8 res5[3]; /* 0x40 */
30 u8 res6[3]; /* 0x44 */
33 u32 res7[2]; /* 0x48 */
35 u32 jtagid; /* 0x50 */
40 * Memory controller registers.
42 typedef struct mem_ctlr {
43 ushort mode; /* 0x100 */
51 * XLB Arbitration registers
53 typedef struct xlb_arb
55 uint res1[16]; /* 0x200 */
56 uint config; /* 0x240 */
57 uint version; /* 0x244 */
58 uint status; /* 0x248 */
59 uint intEnable; /* 0x24c */
60 uint addrCap; /* 0x250 */
61 uint busSigCap; /* 0x254 */
62 uint addrTenTimeOut; /* 0x258 */
63 uint dataTenTimeOut; /* 0x25c */
64 uint busActTimeOut; /* 0x260 */
65 uint mastPriEn; /* 0x264 */
66 uint mastPriority; /* 0x268 */
67 uint baseAddr; /* 0x26c */
73 typedef struct flexbus
75 ushort csar0; /* 0x00 */
77 uint csmr0; /* 0x04 */
78 uint cscr0; /* 0x08 */
80 ushort csar1; /* 0x0c */
82 uint csmr1; /* 0x10 */
83 uint cscr1; /* 0x14 */
85 ushort csar2; /* 0x18 */
87 uint csmr2; /* 0x1c */
88 uint cscr2; /* 0x20 */
90 ushort csar3; /* 0x24 */
92 uint csmr3; /* 0x28 */
93 uint cscr3; /* 0x2c */
95 ushort csar4; /* 0x30 */
97 uint csmr4; /* 0x34 */
98 uint cscr4; /* 0x38 */
100 ushort csar5; /* 0x3c */
102 uint csmr5; /* 0x40 */
103 uint cscr5; /* 0x44 */
125 * General Purpose Timer registers
127 typedef struct gptimer
134 u16 Prescl; /* Prescale */
135 u16 Count; /* Count */
137 u16 PwmWid; /* PWM Width */
138 u8 PwmOp; /* Output Polarity */
139 u8 PwmLd; /* Immediate Update */
141 u16 Capture; /* Capture internal counter */
142 u8 OvfPin; /* Ovf and Pin */
143 u8 Int; /* Interrupts */
151 u32 mr1_2; /* 0x00 Mode reg 1 & 2 */
152 u32 sr_csr; /* 0x04 Status/Clock Select reg */
153 u32 cr; /* 0x08 Command reg */
154 u8 xmitbuf[4]; /* 0x0c Receive/Transmit Buffer */
155 u32 ipcr_acr; /* 0x10 Input Port Change/Auxiliary Control reg */
156 u32 isr_imr; /* 0x14 Interrupt Status/Mask reg */
157 u32 ctur; /* 0x18 Counter Timer Upper reg */
158 u32 ctlr; /* 0x1c Counter Timer Lower reg */
159 u32 rsvd1[4]; /* 0x20 ... 0x2c */
160 u32 ivr; /* 0x30 Interrupt Vector reg */
161 u32 ipr; /* 0x34 Input Port reg */
162 u32 opsetr; /* 0x38 Output Port Set reg */
163 u32 opresetr; /* 0x3c Output Port Reset reg */
164 u32 sicr; /* 0x40 PSC/IrDA control reg */
165 u32 ircr1; /* 0x44 IrDA control reg 1*/
166 u32 ircr2; /* 0x48 IrDA control reg 2*/
167 u32 irsdr; /* 0x4c IrDA SIR Divide reg */
168 u32 irmdr; /* 0x50 IrDA MIR Divide reg */
169 u32 irfdr; /* 0x54 PSC IrDA FIR Divide reg */
170 u32 rfnum; /* 0x58 RX-FIFO counter */
171 u32 txnum; /* 0x5c TX-FIFO counter */
172 u32 rfdata; /* 0x60 RX-FIFO data */
173 u32 rfstat; /* 0x64 RX-FIFO status */
174 u32 rfcntl; /* 0x68 RX-FIFO control */
175 u32 rfalarm; /* 0x6c RX-FIFO alarm */
176 u32 rfrptr; /* 0x70 RX-FIFO read pointer */
177 u32 rfwptr; /* 0x74 RX-FIFO write pointer */
178 u32 rflfrptr; /* 0x78 RX-FIFO last read frame pointer */
179 u32 rflfwptr; /* 0x7c RX-FIFO last write frame pointer */
181 u32 tfdata; /* 0x80 TX-FIFO data */
182 u32 tfstat; /* 0x84 TX-FIFO status */
183 u32 tfcntl; /* 0x88 TX-FIFO control */
184 u32 tfalarm; /* 0x8c TX-FIFO alarm */
185 u32 tfrptr; /* 0x90 TX-FIFO read pointer */
186 u32 tfwptr; /* 0x94 TX-FIFO write pointer */
187 u32 tflfrptr; /* 0x98 TX-FIFO last read frame pointer */
188 u32 tflfwptr; /* 0x9c TX-FIFO last write frame pointer */
192 * Interrupt Controller registers
194 typedef struct interrupt_controller {
216 u32 reserved0; /* 0x14 */
217 u32 reserved1; /* 0x18 */
218 u32 reserved2; /* 0x1c */
224 * Port Configuration Registers
228 uint pcfg0; /* 0x00 */
229 uint pcfg1; /* 0x04 */
230 uint pcfg2; /* 0x08 */
231 uint pcfg3; /* 0x0c */
234 /* ...and the whole thing wrapped up....
236 typedef struct immap {
237 sysconf8220_t im_sysconf; /* System Configuration */
238 memctl8220_t im_memctl; /* Memory Controller */
239 xlbarb8220_t im_xlbarb; /* XLB Arbitration */
240 psc8220_t im_psc; /* PSC controller */
241 flexbus8220_t im_fb; /* FlexBus Controller */
242 i2c8220_t im_i2c; /* I2C control/status */
243 pcfg8220_t im_pcfg; /* Port configuration */
246 #endif /* __IMMAP_MPC8220__ */