6 #define CLID_I2C_AMCC440 "hidd.i2c.amcc440"
8 typedef struct cpuregs
{
20 typedef struct fpuregs
{
25 typedef struct AROSCPUContext
{
30 /* Machine State Register */
31 #define MSR_POW 0x00040000
32 #define MSR_CE 0x00020000
33 #define MSR_EE 0x00008000
34 #define MSR_PR 0x00004000
35 #define MSR_FP 0x00002000
36 #define MSR_ME 0x00001000
37 #define MSR_FE0 0x00000800
38 #define MSR_DWE 0x00000400
39 #define MSR_DE 0x00000200
40 #define MSR_FE1 0x00000100
41 #define MSR_IS 0x00000020
42 #define MSR_DS 0x00000010
45 #define TLB_V 0x00000200
47 /* MMU protection bits (TLB word 2) */
48 #define TLB_SR 0x00000001 /* Supervisor State Read Enable */
49 #define TLB_SW 0x00000002 /* Supervisor State Write Enable */
50 #define TLB_SX 0x00000004 /* Supervisor State Execute Enable */
51 #define TLB_UR 0x00000008 /* User State Read Enable */
52 #define TLB_UW 0x00000010 /* User State Write Enable */
53 #define TLB_UX 0x00000020 /* User State Execute Enable */
54 #define TLB_E 0x00000080 /* Little Endian Enable */
55 #define TLB_G 0x00000100 /* Guarded */
56 #define TLB_M 0x00000200 /* Memory Coherence Required */
57 #define TLB_I 0x00000400 /* Caching Inhibited */
58 #define TLB_W 0x00000800 /* Write Through */
61 #define XER 0x001 /* Integer Exception Register */
62 #define LR 0x008 /* Link Register */
63 #define CTR 0x009 /* Count Register */
64 #define DEC 0x016 /* Decrementer */
65 #define SRR0 0x01A /* Save/Restore Register 0 */
66 #define SRR1 0x01B /* Save/Restore Register 1 */
67 #define PID 0x030 /* Process ID */
68 #define DECAR 0x036 /* Decrementer Auto-Reload */
69 #define CSRR0 0x03A /* Critical Save/Restore Register 0 */
70 #define CSRR1 0x03B /* Critical Save/Restore Register 1 */
71 #define DEAR 0x03D /* Data Exception Address Register */
72 #define ESR 0x03E /* Exception Syndrome Register */
73 #define IVPR 0x03F /* Interrupt Vector Prefix Register */
74 #define USPRG0 0x100 /* User Special Purpose Register General 0 */
75 #define SPRG4U 0x104 /* Special Purpose Register General 4. Usermode - read only */
76 #define SPRG5U 0x105 /* Special Purpose Register General 5. Usermode - read only */
77 #define SPRG6U 0x106 /* Special Purpose Register General 6. Usermode - read only */
78 #define SPRG7U 0x107 /* Special Purpose Register General 7. Usermode - read only */
79 #define TBLU 0x10C /* Time Base Lower */
80 #define TBUU 0x10D /* Time Base Upper */
81 #define SPRG0 0x110 /* Special Purpose Register General 0 */
82 #define SPRG1 0x111 /* Special Purpose Register General 1 */
83 #define SPRG2 0x112 /* Special Purpose Register General 2 */
84 #define SPRG3 0x113 /* Special Purpose Register General 3 */
85 #define SPRG4 0x114 /* Special Purpose Register General 4 */
86 #define SPRG5 0x115 /* Special Purpose Register General 5 */
87 #define SPRG6 0x116 /* Special Purpose Register General 6 */
88 #define SPRG7 0x117 /* Special Purpose Register General 7 */
89 #define TBL 0x11C /* Time Base Lower */
90 #define TBU 0x11D /* Time Base Upper */
91 #define PIR 0x11E /* Processor ID Register */
92 #define PVR 0x11F /* Processor Version Register */
93 #define DBSR 0x130 /* Debug Status Register */
94 #define DBCR0 0x134 /* Debug Control Register 0 */
95 #define DBCR1 0x135 /* Debug Control Register 1 */
96 #define DBCR2 0x136 /* Debug Control Register 2 */
97 #define IAC1 0x138 /* Instruction Address Compare 1 */
98 #define IAC2 0x139 /* Instruction Address Compare 2 */
99 #define IAC3 0x13A /* Instruction Address Compare 3 */
100 #define IAC4 0x13B /* Instruction Address Compare 4 */
101 #define DAC1 0x13C /* Data Address Compare 1 */
102 #define DAC2 0x13D /* Data Address Compare 2 */
103 #define DVC1 0x13E /* Data Value Compare 1 */
104 #define DVC2 0x13F /* Data Value Compare 2 */
105 #define TSR 0x150 /* Timer Status Register */
106 #define TCR 0x154 /* Timer Control Register */
107 #define IVOR0 0x190 /* Interrupt Vector Offset Register 0 */
108 #define IVOR1 0x191 /* Interrupt Vector Offset Register 1 */
109 #define IVOR2 0x192 /* Interrupt Vector Offset Register 2 */
110 #define IVOR3 0x193 /* Interrupt Vector Offset Register 3 */
111 #define IVOR4 0x194 /* Interrupt Vector Offset Register 4 */
112 #define IVOR5 0x195 /* Interrupt Vector Offset Register 5 */
113 #define IVOR6 0x196 /* Interrupt Vector Offset Register 6 */
114 #define IVOR7 0x197 /* Interrupt Vector Offset Register 7 */
115 #define IVOR8 0x198 /* Interrupt Vector Offset Register 8 */
116 #define IVOR9 0x199 /* Interrupt Vector Offset Register 9 */
117 #define IVOR10 0x19A /* Interrupt Vector Offset Register 10 */
118 #define IVOR11 0x19B /* Interrupt Vector Offset Register 11 */
119 #define IVOR12 0x19C /* Interrupt Vector Offset Register 12 */
120 #define IVOR13 0x19D /* Interrupt Vector Offset Register 13 */
121 #define IVOR14 0x19E /* Interrupt Vector Offset Register 14 */
122 #define IVOR15 0x19F /* Interrupt Vector Offset Register 15 */
123 #define MCSRR0 0x23A /* Machine Check Save Restore Register 0 */
124 #define MCSRR1 0x23B /* Machine Check Save Restore Register 1 */
125 #define MCSR 0x23C /* Machine Check Status Register */
126 #define INV0 0x370 /* Instruction Cache Normal Victim 0 */
127 #define INV1 0x371 /* Instruction Cache Normal Victim 1 */
128 #define INV2 0x372 /* Instruction Cache Normal Victim 2 */
129 #define INV3 0x373 /* Instruction Cache Normal Victim 3 */
130 #define ITV0 0x374 /* Instruction Cache Transient Victim 0 */
131 #define ITV1 0x375 /* Instruction Cache Transient Victim 1 */
132 #define ITV2 0x376 /* Instruction Cache Transient Victim 2 */
133 #define ITV3 0x377 /* Instruction Cache Transient Victim 3 */
134 #define CCR1 0x378 /* Core Configuration Register 1 */
135 #define DNV0 0x390 /* Data Cache Normal Victim 0 */
136 #define DNV1 0x391 /* Data Cache Normal Victim 1 */
137 #define DNV2 0x392 /* Data Cache Normal Victim 2 */
138 #define DNV3 0x393 /* Data Cache Normal Victim 3 */
139 #define DTV0 0x394 /* Data Cache Transient Victim 0 */
140 #define DTV1 0x395 /* Data Cache Transient Victim 1 */
141 #define DTV2 0x396 /* Data Cache Transient Victim 2 */
142 #define DTV3 0x397 /* Data Cache Transient Victim 3 */
143 #define DVLIM 0x398 /* Data Cache Victim Limit */
144 #define IVLIM 0x399 /* Instruction Cache Victim Limit */
145 #define RSTCFG 0x39B /* Reset Configuration */
146 #define DCDBTRL 0x39C /* Data Cache Debug Tag Register Low */
147 #define DCDBTRH 0x39D /* Data Cache Debug Tag Register High */
148 #define ICDBTRL 0x39E /* Instruction Cache Debug Tag Register Low */
149 #define ICDBTRH 0x39F /* Instruction Cache Debug Tag Register High */
150 #define MMUCR 0x3B2 /* Memory Management Unit Control Register */
151 #define CCR0 0x3B3 /* Core Configuration Register 0 */
152 #define ICDBDR 0x3D3 /* Instruction Cache Debug Data Register */
153 #define DBDR 0x3F3 /* Debug Data Register */
156 #define ESR_PIL 0x08000000
159 #define PVR_PPC440EP_B 0x422218D3
160 #define PVR_PPC440EP_C 0x422218D4
161 #define PVR_PPC460EX_B 0x130218a4
164 #define TCR_WP 0xc0000000
165 #define TCR_WP21 0x00000000
166 #define TCR_WP25 0x40000000
167 #define TCR_WP29 0x80000000
168 #define TCR_WP33 0xc0000000
169 #define TCR_WRC 0x30000000
170 #define TCR_WRC_NORESET 0x00000000
171 #define TCR_WRC_CORE 0x10000000
172 #define TCR_WRC_CHIP 0x20000000
173 #define TCR_WRC_SYSTEM 0x30000000
174 #define TCR_WIE 0x08000000
175 #define TCR_DIE 0x04000000
176 #define TCR_FP 0x03000000
177 #define TCR_FP_13 0x00000000
178 #define TCR_FP_17 0x01000000
179 #define TCR_FP_21 0x02000000
180 #define TCR_FP_25 0x03000000
181 #define TCR_FIE 0x00800000
182 #define TCR_ARE 0x00400000
185 #define TSR_ENW 0x80000000
186 #define TSR_WIS 0x40000000
187 #define TSR_WRS 0x30000000
188 #define TSR_WRS_NORESET 0x00000000
189 #define TSR_WRS_CORE 0x10000000
190 #define TSR_WRS_CHIP 0x20000000
191 #define TSR_WRS_SYSTEM 0x30000000
192 #define TSR_DIS 0x08000000
193 #define TSR_FIS 0x04000000
198 ({ unsigned long val; asm volatile("mfdcr %0,%1":"=r"(val):"i"(reg)); val; })
200 #define wrdcr(reg, val) \
201 do { asm volatile("mtdcr %0,%1"::"i"(reg),"r"(val)); } while(0)
203 /* System device control */
204 #define CPR0_CFGADDR 0x000C /* Clocking Configuration Address Register */
205 #define CPR0_CFGDATA 0x000D /* Clocking Configuration Data Register */
206 #define CPR0_CLKUPD 0x0020 /* Clocking Update Register */
207 #define CPR0_ICFG 0x0140 /* Clock/Power Configuration Register */
209 /* PPC440 specific registers */
210 #define CPR0_PLLC0 0x0040 /* PLL Control Register */
211 #define CPR0_PLLD0 0x0060 /* PLL Divisor Register */
212 #define CPR0_PRIMAD0 0x0080 /* Primary A Divisor Register */
213 #define CPR0_PRIMBD0 0x00A0 /* Primary B Divisor Register */
214 #define CPR0_OPBD0 0x00C0 /* OPB Clock Divisor Register */
215 #define CPR0_PERD0 0x00E0 /* Peripheral Clock Divisor Register */
216 #define CPR0_MALD 0x0100 /* MAL Clock Divisor Register */
217 #define CPR0_SPCID 0x0120 /* Sync PCI Clock Divisor Register */
219 /* PPC460 specific registers */
220 #define CPR0_PLLC 0x0040 /* PLL Control Register */
221 #define CPR0_PLLD 0x0060 /* PLL Divisor Register */
222 #define CPR0_PLBED 0x0080 /* PLB Early Divisor Register */
223 #define CPR0_PLB2D 0x00A0 /* PLB Divisor Register */
224 #define CPR0_OPBD 0x00C0 /* OPB Clock Divisor Register */
225 #define CPR0_PERD 0x00E0 /* Peripheral Clock Divisor Register */
226 #define CPR0_AHBD 0x0100 /* AHB Clock Divisor Register */
228 #define SDR0_CFGADDR 0x000E /* R/W System DCR Configuration Address Register */
229 #define SDR0_CFGDATA 0x000F /* R/W System DCR Configuration Data Register */
230 #define SDR0_SDSTP0 0x0020 /* R Serial Device Strap Register 0 */
231 #define SDR0_SDSTP1 0x0021 /* R Serial Device Strap Register 1 */
232 #define SDR0_PINSTP 0x0040 /* R Pin Strapping Register */
233 #define SDR0_SDCS0 0x0060 /* R/W Serial Device Controller Settings Register */
234 #define SDR0_ECID0 0x0080 /* R/W Electronic Chip ID Register 0 */
235 #define SDR0_ECID1 0x0081 /* R/W Electronic Chip ID Register 1 */
236 #define SDR0_ECID2 0x0082 /* R/W Electronic Chip ID Register 2 */
237 #define SDR0_ECID3 0x0083 /* R/W Electronic Chip ID Register 3 */
238 #define SDR0_JTAG 0x00C0 /* R/W JTAG ID Register */
239 #define SDR0_DDRDL0 0x00E0 /* R/W DDR Delay Line Register */
240 #define SDR0_EBC0 0x0100 /* R/W EBC Configuration Register */
241 #define SDR0_UART0 0x0120 /* R/W UART Configuration Register 0 */
242 #define SDR0_UART1 0x0121 /* R/W UART Configuration Register 1 */
243 #define SDR0_UART2 0x0122 /* R/W UART Configuration Register 2 */
244 #define SDR0_UART3 0x0123 /* R/W UART Configuration Register 3 */
245 #define SDR0_CP440 0x0180 /* R/W 440CPU Control Register */
246 #define SDR0_SRST0 0x0200 /* R/W Individual Core Reset Control Register 0 */
247 #define SDR0_SRST1 0x0201 /* R/W Individual Core Reset Control Register 1 */
248 #define SDR0_SLPIPE0 0x0220 /* R/W PLB Slave Address Pipeline Disabling Register */
249 #define SDR0_AMP0 0x0240 /* R/W Alternate PLB4 Master Priority Register */
250 #define SDR0_AMP1 0x0241 /* R/W Alternate PLB3 Master Priority Register */
251 #define SDR0_MIRQ0 0x0260 /* R/W Master Interrupt Request Register 0 (PLB3) */
252 #define SDR0_MALTBL 0x0280 /* R/W MAL Transmit Burst Length Register */
253 #define SDR0_MALRBL 0x02A0 /* R/W MAL Receive Burst Length Register */
254 #define SDR0_MALTBS 0x02C0 /* R/W Reserved */
255 #define SDR0_MALRBS 0x02E0 /* R/W Reserved */
256 #define SDR0_PCI0 0x0300 /* R/W PCI Control Register */
257 #define SDR0_USB0 0x0320 /* R Universal Serial Bus Register 0 */
258 #define SDR0_CUST0 0x4000 /* R/W Register0 Reserved for Customer Use */
259 #define SDR0_SDSTP2 0x4001 /* R Read Only Version of SDR0_CUST0 */
260 #define SDR0_CUST1 0x4002 /* R/W Register1 Reserved for Customer Use */
261 #define SDR0_SDSTP3 0x4003 /* R Read Only Version of SDR0_CUST1 */
262 #define SDR0_PFC0 0x4100 /* R/W Pin Function Control Register 0 */
263 #define SDR0_PFC1 0x4101 /* R/W Pin Function Control Register 1 */
264 #define SDR0_MFR 0x4300 /* R/W Miscellaneous Function Register */
265 #define SDR0_EMAC0RXST 0x4301 /* R/W EMAC0 RX Status Register */
266 #define SDR0_EMAC0TXST 0x4302 /* R/W EMAC0 TX Status Register */
267 #define SDR0_EMAC0REJCNT 0x4303 /* R EMAC0 RX Packet Reject Counter */
268 #define SDR0_EMAC1RXST 0x4304 /* R/W EMAC1 RX Status Register */
269 #define SDR0_EMAC1TXST 0x4305 /* R/W EMAC1 TX Status Register */
270 #define SDR0_EMAC1REJCNT 0x4306 /* R EMAC1 RX Packet Reject Counter */
271 #define SDR0_HSF 0x4400 /* R/W DDR Hardware Self Refresh Register */
273 #define SDR0_MFR_ZMII_MODE_MASK 0x30000000
275 #define SDR0_MFR_ZMII_MODE_MII 0x00000000
276 #define SDR0_MFR_ZMII_MODE_SMII 0x10000000
277 #define SDR0_MFR_ZMII_MODE_RMII_10M 0x20000000
278 #define SDR0_MFR_ZMII_MODE_RMII_100M 0x30000000
280 /* 440EP DDR SDRAM Controller */
281 #define SDRAM0_CFGADDR 0x0010 /* R/W DDR-SDRAM Address Register */
282 #define SDRAM0_CFGDATA 0x0011 /* R/W DDR-SDRAM Data Register */
283 #define SDRAM0_B0CR 0x0040 /* R/W DDR SDRAM Bank 0 Configuration */
284 #define SDRAM0_B1CR 0x0044 /* R/W DDR SDRAM Bank 1 Configuration */
285 #define SDRAM0_B2CR 0x0048 /* R/W DDR SDRAM Bank 2 Configuration */
286 #define SDRAM0_B3CR 0x004C /* R/W DDR SDRAM Bank 3 Configuration */
288 #define SDRAM_SDSZ_MASK 0x000E0000
289 #define SDRAM_SDSZ_256MB 0x000C0000
290 #define SDRAM_SDSZ_128MB 0x000A0000
291 #define SDRAM_SDSZ_64MB 0x00080000
292 #define SDRAM_SDSZ_32MB 0x00060000
293 #define SDRAM_SDSZ_16MB 0x00040000
294 #define SDRAM_SDSZ_8MB 0x00020000
296 /* 460EX DDR MQ Controller */
297 #define MQ0_B0BAS 0x0040
298 #define MQ0_B1BAS 0x0041
299 #define MQ0_B2BAS 0x0042
300 #define MQ0_B3BAS 0x0043
302 #define MQ0_BASSZ_MASK 0x0000FFC0
303 #define MQ0_BASSZ_0MB 0x0000
304 #define MQ0_BASSZ_8MB 0xFFC0
305 #define MQ0_BASSZ_16MB 0xFF80
306 #define MQ0_BASSZ_32MB 0xFF00
307 #define MQ0_BASSZ_64MB 0xFE00
308 #define MQ0_BASSZ_128MB 0xFC00
309 #define MQ0_BASSZ_256MB 0xF800
310 #define MQ0_BASSZ_512MB 0xF000
311 #define MQ0_BASSZ_1024MB 0xE000
312 #define MQ0_BASSZ_2048MB 0xC000
313 #define MQ0_BASSZ_4096MB 0x8000
315 /* Universal Interrupt Controller 0 */
316 #define UIC0_SR 0x00C0 /* R/Clear UIC 0 Status Register */
317 #define UIC0_SRS 0x00C1 /* W/Set UIC 0 Status Register Set (reserved for debug only) */
318 #define UIC0_ER 0x00C2 /* R/W UIC 0 Enable Register */
319 #define UIC0_CR 0x00C3 /* R/W UIC 0 Critical Register */
320 #define UIC0_PR 0x00C4 /* R/W UIC 0 Polarity Register */
321 #define UIC0_TR 0x00C5 /* R/W UIC 0 Triggering Register */
322 #define UIC0_MSR 0x00C6 /* R UIC 0 Masked Status Register */
323 #define UIC0_VR 0x00C7 /* R UIC 0 Vector Register */
324 #define UIC0_VCR 0x00C8 /* W UIC 0 Vector Configuration Register */
326 /* Universal Interrupt Controller 1 */
327 #define UIC1_SR 0x00D0 /* R/Clear UIC 1 Status Register */
328 #define UIC1_SRS 0x00D1 /* W/Set UIC 1 Status Register Set (reserved for debug only) */
329 #define UIC1_ER 0x00D2 /* R/W UIC 1 Enable Register */
330 #define UIC1_CR 0x00D3 /* R/W UIC 1 Critical Register */
331 #define UIC1_PR 0x00D4 /* R/W UIC 1 Polarity Register */
332 #define UIC1_TR 0x00D5 /* R/W UIC 1 Triggering Register */
333 #define UIC1_MSR 0x00D6 /* R UIC 1 Masked Status Register */
334 #define UIC1_VR 0x00D7 /* R UIC 1 Vector Register */
335 #define UIC1_VCR 0x00D8 /* W UIC 1 Vector Configuration Register */
339 /* Universal Interrupt Controller 2 */
340 #define UIC2_SR 0x00E0 /* R/Clear UIC 2 Status Register */
341 #define UIC2_SRS 0x00E1 /* W/Set UIC 2 Status Register Set (reserved for debug only) */
342 #define UIC2_ER 0x00E2 /* R/W UIC 2 Enable Register */
343 #define UIC2_CR 0x00E3 /* R/W UIC 2 Critical Register */
344 #define UIC2_PR 0x00E4 /* R/W UIC 2 Polarity Register */
345 #define UIC2_TR 0x00E5 /* R/W UIC 2 Triggering Register */
346 #define UIC2_MSR 0x00E6 /* R UIC 2 Masked Status Register */
347 #define UIC2_VR 0x00E7 /* R UIC 2 Vector Register */
348 #define UIC2_VCR 0x00E8 /* W UIC 2 Vector Configuration Register */
350 /* Universal Interrupt Controller 3 */
351 #define UIC3_SR 0x00F0 /* R/Clear UIC 3 Status Register */
352 #define UIC3_SRS 0x00F1 /* W/Set UIC 3 Status Register Set (reserved for debug only) */
353 #define UIC3_ER 0x00F2 /* R/W UIC 3 Enable Register */
354 #define UIC3_CR 0x00F3 /* R/W UIC 3 Critical Register */
355 #define UIC3_PR 0x00F4 /* R/W UIC 3 Polarity Register */
356 #define UIC3_TR 0x00F5 /* R/W UIC 3 Triggering Register */
357 #define UIC3_MSR 0x00F6 /* R UIC 3 Masked Status Register */
358 #define UIC3_VR 0x00F7 /* R UIC 3 Vector Register */
359 #define UIC3_VCR 0x00F8 /* W UIC 3 Vector Configuration Register */
361 /* External 440 interrupt sources */
362 #define INTR_U0 0 /* UART0 Interrupt Status*/
363 #define INTR_U1 1 /* UART1 Interrupt Status*/
364 #define INTR_IIC0 2 /* IIC0 Interrupt Status*/
365 #define INTR_U2 3 /* UART2 Interrupt Status*/
366 #define INTR_U3 4 /* UART3 Interrupt Status*/
367 #define INTR_PCRW 5 /* PCI Command Register Write Interrupt Status */
368 #define INTR_PCIPM 6 /* PCI Power Management Interrupt Status */
369 #define INTR_IIC1 7 /* IIC1 Interrupt Status */
370 #define INTR_SPI 8 /* SPI Interrupt Status */
371 #define INTR_EPS 9 /* Ext PCI SERR Interrupt Status */
372 #define INTR_MTE 10 /* MAL TX EOB Interrupt Status */
373 #define INTR_MRE 11 /* MAL RX EOB Interrupt Status */
374 #define INTR_D0 12 /* DMA2P30 Channel 0 Interrupt Status */
375 #define INTR_D1 13 /* DMA2P30 Channel 1 Interrupt Status */
376 #define INTR_D2 14 /* DMA2P30 Channel 2 Interrupt Status */
377 #define INTR_D3 15 /* DMA2P30 Channel 3 Interrupt Status */
378 #define INTR_CT5 16 /* GPT Compare Timer 5 Interrupt Status */
379 #define INTR_CT6 17 /* GPT Compare Timer 6 Interrupt Status */
380 #define INTR_CT0 18 /* GPT Compare Timer 0 Interrupt Status */
381 #define INTR_CT1 19 /* GPT Compare Timer 1 Interrupt Status */
382 #define INTR_CT2 20 /* GPT Compare Timer 2 Interrupt Status */
383 #define INTR_CT3 21 /* GPT Compare Timer 3 Interrupt Status */
384 #define INTR_CT4 22 /* GPT Compare Timer 4 Interrupt Status */
385 #define INTR_EIR0 23 /* External IRQ 0 Interrupt Status */
386 #define INTR_EIR1 24 /* External IRQ 1 Interrupt Status */
387 #define INTR_EIR2 25 /* External IRQ 2 Interrupt Status */
388 #define INTR_EIR3 26 /* External IRQ 3 Interrupt Status */
389 #define INTR_EIR4 27 /* External IRQ 4 Interrupt Status */
390 #define INTR_EIR5 28 /* External IRQ 5 Interrupt Status */
391 #define INTR_EIR6 29 /* External IRQ 6 Interrupt Status */
393 #define INTR_MS 32 /* MAL SERR Interrupt Status */
394 #define INTR_MTDE 33 /* MAL TXDE Interrupt Status */
395 #define INTR_MRDE 34 /* MAL RXDE Interrupt Status */
396 #define INTR_DEUE 35 /* DDRSDRAM ECC Uncorrectable Error Interrupt Status */
397 #define INTR_DECE 36 /* DDRSDRAM ECC Correctable Error Interrupt Status */
398 #define INTR_EBC 37 /* EBC Interrupt Status */
399 #define INTR_NDFC 38 /* NDFC Interrupt Status */
400 #define INTR_OPB 39 /* OPB to PLB Bridge Interrupt Status */
401 #define INTR_USB1H1 40 /* USB1.1 Host 1 Interrupt Status */
402 #define INTR_USB1H2 41 /* USB1.1 Host 2 interrupt Status */
403 #define INTR_P2P0 42 /* PLB3 to PLB4 Bridge 0 Interrupt Status */
404 #define INTR_P2P1 43 /* PLB3 to PLB4 Bridge 1 Interrupt Status */
405 #define INTR_P2P2 44 /* PLB3 to PLB4 Bridge 2 Interrupt Status */
406 #define INTR_P2P3 45 /* PLB3 to PLB4 Bridge 3 Interrupt Status */
407 #define INTR_P2P4 46 /* PLB3 to PLB4 Bridge 4 Interrupt Status */
408 #define INTR_P2P5 47 /* PLB3 to PLB4 Bridge 5 Interrupt Status */
409 #define INTR_UDMA0 48 /* UDMA0 Interrupt Status */
410 #define INTR_UDMA1 49 /* UDMA1 Interrupt Status */
411 #define INTR_EIR7 50 /* External IRQ 7 Interrupt Status */
412 #define INTR_EIR8 51 /* External IRQ 8 Interrupt Status */
413 #define INTR_EIR9 52 /* External IRQ 9 Interrupt Status */
414 #define INTR_UDMA2 53 /* UDMA2 Interrupt Status */
415 #define INTR_UDMA3 54 /* UDMA3 Interrupt Status */
416 #define INTR_USBD 55 /* USB1.1 USB2.0 Device Interrupt Status */
417 #define INTR_SRE 56 /* Serial ROM Error Interrupt Status */
418 #define INTR_GDP 57 /* GPT Decrement Pulse Interrupt Status */
419 #define INTR_PPM 58 /* PLB Performance Monitor Interrupt Status */
420 #define INTR_EPP 59 /* EXT_PCI_PERR (parity) Interrupt Status */
421 #define INTR_ETH0 60 /* Ethernet 0 Interrupt Status */
422 #define INTR_EWU0 61 /* Ethernet 0 Wake-up Interrupt Status */
423 #define INTR_ETH1 62 /* Ethernet 1 Interrupt Status */
424 #define INTR_EWU1 63 /* Ethernet 1 Wake-up Interrupt Status */
426 /* 460ex Interrupts [High/Low Polarity,Level Sensitivity]
427 * UIC0 [ Rising/Falling,Edge Sensitivity ] */
428 #define INTR_UIC0_BASE 0
429 #define INTR_UIC0_CRITICAL 0x00104001
430 #define INTR_UIC0_POLARITY 0xffffffff
431 #define INTR_UIC0_TRIGGER 0x01800800
432 #define INTR_UIC0_CASCADE 0x0030c003
433 #define INTR_UIC0_UART1 (INTR_UIC0_BASE + 1) // H L UART1
434 #define INTR_UIC0_IIC0 (INTR_UIC0_BASE + 2) // H L
435 #define INTR_UIC0_IIC1 (INTR_UIC0_BASE + 3) // H L
436 #define INTR_UIC0_PCI0_IN (INTR_UIC0_BASE + 4) // H L PCI0 Inbound Message
437 #define INTR_UIC0_PCI0_CWR (INTR_UIC0_BASE + 5) // H L PCI0 Command Write Register
438 #define INTR_UIC0_PCI0_PWR (INTR_UIC0_BASE + 6) // H L PCI0 Power management
439 #define INTR_UIC0_PCI0_VPD (INTR_UIC0_BASE + 7) // R E PCI0 VPD Access
440 #define INTR_UIC0_PCI0_MSI0 (INTR_UIC0_BASE + 8) // R E PCI0 MSI Level 0
441 #define INTR_UIC0_EXT_IRQ0 (INTR_UIC0_BASE + 9) // ? ? External IRQ 0
442 #define INTR_UIC0_UIC2_NC (INTR_UIC0_BASE + 10) // H L UIC2 Cascade (Non-Critical)
443 #define INTR_UIC0_UIC2_CR (INTR_UIC0_BASE + 11) // H L UIC2 Cascade (Critical)
444 #define INTR_UIC0_DMA2P40_CH0 (INTR_UIC0_BASE + 12) // H L DMA2P40 Channel 0
445 #define INTR_UIC0_DMA2P40_CH1 (INTR_UIC0_BASE + 13) // H L DMA2P40 Channel 1
446 #define INTR_UIC0_DMA2P40_CH2 (INTR_UIC0_BASE + 14) // H L DMA2P40 Channel 2
447 #define INTR_UIC0_DMA2P40_CH3 (INTR_UIC0_BASE + 15) // H L DMA2P40 Channel 3
448 #define INTR_UIC0_UIC3_NC (INTR_UIC0_BASE + 16) // H L UIC3 Cascade (Non-Critical)
449 #define INTR_UIC0_UIC3_CR (INTR_UIC0_BASE + 17) // H L UIC3 Cascade (Critical)
450 #define INTR_UIC0_EXT_IRQ1 (INTR_UIC0_BASE + 18) // ? ? External IRQ 1
451 #define INTR_UIC0_TRNG_READY (INTR_UIC0_BASE + 19) // H L TRNG ready
452 #define INTR_UIC0_PKA (INTR_UIC0_BASE + 20) // R E PKA Ready
453 #define INTR_UIC0_HSDMA_FULL (INTR_UIC0_BASE + 21) // H L HSDMA Command Pointer FIFO Full
454 #define INTR_UIC0_HSDMA_STATUS (INTR_UIC0_BASE + 22) // H L HSDMA Command Status FIFO
455 #define INTR_UIC0_I2O_DOORBELL (INTR_UIC0_BASE + 23) // H L I2O Inbound Doorbell
456 #define INTR_UIC0_I2O_N_EMPTY (INTR_UIC0_BASE + 24) // H L I2O Inbound FIFO Not Empty
457 #define INTR_UIC0_I2O_LLW0 (INTR_UIC0_BASE + 25) // H L I2O Region 0 Low Latency PLB Write
458 #define INTR_UIC0_I2O_LLW1 (INTR_UIC0_BASE + 26) // H L I2O Region 1 Low Latency PLB Write
459 #define INTR_UIC0_I2O_HBW0 (INTR_UIC0_BASE + 27) // H L I2O Region 0 High Bandwidth PLB Write
460 #define INTR_UIC0_I2O_HBW1 (INTR_UIC0_BASE + 28) // H L I2O Region 1 High Bandwidth PLB Write
461 #define INTR_UIC0_EIP94 (INTR_UIC0_BASE + 29) // H L Security EIP-94
462 #define INTR_UIC0_UIC1_NC (INTR_UIC0_BASE + 30) // H L UIC1 Cascade (Non-Critical)
463 #define INTR_UIC0_UIC1_CR (INTR_UIC0_BASE + 31) // H L UIC1 Cascade (Critical)
465 /* 460ex Interrupts [High/Low Polarity,Level Sensitivity]
466 * UIC1 [ Rising/Falling,Edge Sensitivity ] */
467 #define INTR_UIC1_BASE 32
468 #define INTR_UIC1_CRITICAL 0x00000000
469 #define INTR_UIC1_POLARITY 0xffffffff
470 #define INTR_UIC1_TRIGGER 0x00fff000
471 #define INTR_UIC1_EXT_IRQ2 (INTR_UIC1_BASE + 0) // ? ? External IRQ 2
472 #define INTR_UIC1_UART0 (INTR_UIC1_BASE + 1) // H L Uart 0
473 #define INTR_UIC1_SPI (INTR_UIC1_BASE + 2) // H L SPI
474 #define INTR_UIC1_TRNG_ALARM (INTR_UIC1_BASE + 3) // H L TRNG Alarm
475 #define INTR_UIC1_ECC (INTR_UIC1_BASE + 4) // H L
476 #define INTR_UIC1_EBC (INTR_UIC1_BASE + 5) // H L
477 #define INTR_UIC1_NDFC (INTR_UIC1_BASE + 6) // H L
478 #define INTR_UIC1_EIPPKP_SLAVE (INTR_UIC1_BASE + 7) // H L
479 #define INTR_UIC1_PCI0_MSI1 (INTR_UIC1_BASE + 8) // R E PCI MSI Level 1
480 #define INTR_UIC1_PCI0_MSI2 (INTR_UIC1_BASE + 9) // R E PCI MSI Level 2
481 #define INTR_UIC1_PCI0_MSI3 (INTR_UIC1_BASE + 10) // R E PCI MSI Level 3
482 #define INTR_UIC1_L2 (INTR_UIC1_BASE + 11) // R E
483 #define INTR_UIC1_GPT_CMP0 (INTR_UIC1_BASE + 12) // R E GPT Compare Timer 0
484 #define INTR_UIC1_GPT_CMP1 (INTR_UIC1_BASE + 13) // R E GPT Compare Timer 1
485 #define INTR_UIC1_GPT_CMP2 (INTR_UIC1_BASE + 14) // R E GPT Compare Timer 2
486 #define INTR_UIC1_GPT_CMP3 (INTR_UIC1_BASE + 15) // R E GPT Compare Timer 3
487 #define INTR_UIC1_GPT_CMP4 (INTR_UIC1_BASE + 16) // R E GPT Compare Timer 4
488 #define INTR_UIC1_GPT_CMP5 (INTR_UIC1_BASE + 17) // R E GPT Compare Timer 5
489 #define INTR_UIC1_GPT_CMP6 (INTR_UIC1_BASE + 18) // R E GPT Compare Timer 6
490 #define INTR_UIC1_GPT_DCT (INTR_UIC1_BASE + 19) // R E GPT Down Count Timer
491 #define INTR_UIC1_EXT_IRQ3 (INTR_UIC1_BASE + 20) // ? ?
492 #define INTR_UIC1_EXT_IRQ4 (INTR_UIC1_BASE + 21) // ? ?
493 #define INTR_UIC1_HSDMA_ERR (INTR_UIC1_BASE + 22) // H L
494 #define INTR_UIC1_I2O_ERR (INTR_UIC1_BASE + 23) // H L
495 #define INTR_UIC1_SROM_ERR (INTR_UIC1_BASE + 24) // H L
496 #define INTR_UIC1_PCI0_ERROR (INTR_UIC1_BASE + 25) // H L
497 #define INTR_UIC1_EXT_IRQ5 (INTR_UIC1_BASE + 26) // ? ?
498 #define INTR_UIC1_EXT_IRQ6 (INTR_UIC1_BASE + 27) // ? ?
499 #define INTR_UIC1_UART2 (INTR_UIC1_BASE + 28) // H L
500 #define INTR_UIC1_UART3 (INTR_UIC1_BASE + 29) // H L
501 #define INTR_UIC1_EXT_IRQ7 (INTR_UIC1_BASE + 30) // ? ?
502 #define INTR_UIC1_EXT_IRQ8 (INTR_UIC1_BASE + 31) // ? ?
504 /* 460ex Interrupts [High/Low Polarity,Level Sensitivity]
505 * UIC2 [ Rising/Falling,Edge Sensitivity ] */
506 #define INTR_UIC2_BASE 64
507 #define INTR_UIC2_CRITICAL 0x00000000
508 #define INTR_UIC2_POLARITY 0xffffffff
509 #define INTR_UIC2_TRIGGER 0x00ff0000
510 #define INTR_UIC2_TAHOE0 (INTR_UIC2_BASE + 0) // H L
511 #define INTR_UIC2_TAHOE1 (INTR_UIC2_BASE + 1) // H L
512 #define INTR_UIC2_EXT_IRQ9 (INTR_UIC2_BASE + 2) // ? ?
513 #define INTR_UIC2_MAL_SERR (INTR_UIC2_BASE + 3) // H L
514 #define INTR_UIC2_MAL_TXDE (INTR_UIC2_BASE + 4) // H L
515 #define INTR_UIC2_MAL_RXDE (INTR_UIC2_BASE + 5) // H L
516 #define INTR_UIC2_MAL_TX_EOB (INTR_UIC2_BASE + 6) // H L
517 #define INTR_UIC2_MAL_RX_EOB (INTR_UIC2_BASE + 7) // H L
518 #define INTR_UIC2_MAL_TX0 (INTR_UIC2_BASE + 8) // R E
519 #define INTR_UIC2_MAL_TX1 (INTR_UIC2_BASE + 9) // R E
520 #define INTR_UIC2_MAL_TX2 (INTR_UIC2_BASE + 10) // R E
521 #define INTR_UIC2_MAL_TX3 (INTR_UIC2_BASE + 11) // R E
522 #define INTR_UIC2_MAL_RX0 (INTR_UIC2_BASE + 12) // R E
523 #define INTR_UIC2_MAL_RX1 (INTR_UIC2_BASE + 13) // R E
524 #define INTR_UIC2_MAL_RX2 (INTR_UIC2_BASE + 14) // R E
525 #define INTR_UIC2_MAL_RX3 (INTR_UIC2_BASE + 15) // R E
526 #define INTR_UIC2_EMAC0 (INTR_UIC2_BASE + 16) // H L
527 #define INTR_UIC2_EMAC1 (INTR_UIC2_BASE + 17) // H L
528 #define INTR_UIC2_EMAC2 (INTR_UIC2_BASE + 18) // H L
529 #define INTR_UIC2_EMAC3 (INTR_UIC2_BASE + 19) // H L
530 #define INTR_UIC2_EMAC0_WAKE (INTR_UIC2_BASE + 20) // H L
531 #define INTR_UIC2_EMAC1_WAKE (INTR_UIC2_BASE + 21) // H L
532 #define INTR_UIC2_EMAC2_WAKE (INTR_UIC2_BASE + 22) // H L
533 #define INTR_UIC2_EMAC3_WAKE (INTR_UIC2_BASE + 23) // H L
534 #define INTR_UIC2_EXT_IRQ10 (INTR_UIC2_BASE + 24) // H L
535 #define INTR_UIC2_EXT_IRQ11 (INTR_UIC2_BASE + 25) // ? ?
536 /* UIC1, IRQ port (INTR_UIC2_BASE + 26) is reserved */
537 #define INTR_UIC2_AHBARB_ERR (INTR_UIC2_BASE + 27) // H L
538 #define INTR_UIC2_USB_OTG (INTR_UIC2_BASE + 28) // H L
539 #define INTR_UIC2_USB_EHCI (INTR_UIC2_BASE + 29) // H L
540 #define INTR_UIC2_USB_OHCI (INTR_UIC2_BASE + 30) // H L
541 #define INTR_UIC2_USB_OHCI_SMI (INTR_UIC2_BASE + 31) // H L
543 /* 460ex Interrupts [High/Low Polarity,Level Sensitivity]
544 * UIC3 [ Rising/Falling,Edge Sensitivity ] */
545 #define INTR_UIC3_BASE 96
546 #define INTR_UIC3_CRITICAL 0x00000000
547 #define INTR_UIC3_POLARITY 0xf7dfffff
548 #define INTR_UIC3_TRIGGER 0x69a000ff
549 #define INTR_UIC3_PE0_AL (INTR_UIC3_BASE + 0) // H L PCIE0 (if SATA is disabled)
550 #define INTR_UIC3_SATA (INTR_UIC3_BASE + 0) // H L SATA (if PCIE0 is disabled)
551 #define INTR_UIC3_PE0_VPD (INTR_UIC3_BASE + 1) // R E
552 #define INTR_UIC3_PE0_HOTPLUG (INTR_UIC3_BASE + 2) // R E
553 #define INTR_UIC3_PE0_TCR (INTR_UIC3_BASE + 3) // H L
554 #define INTR_UIC3_PE0_VCO (INTR_UIC3_BASE + 4) // F E
555 #define INTR_UIC3_PE0_DCR (INTR_UIC3_BASE + 5) // H L
556 #define INTR_UIC3_PE1_AL (INTR_UIC3_BASE + 6) // H L
557 #define INTR_UIC3_PE1_VPD (INTR_UIC3_BASE + 7) // R E
558 #define INTR_UIC3_PE1_HOTPLUG (INTR_UIC3_BASE + 8) // R E
559 #define INTR_UIC3_PE1_TCR (INTR_UIC3_BASE + 9) // H L
560 #define INTR_UIC3_PE1_VCO (INTR_UIC3_BASE + 10) // F E
561 #define INTR_UIC3_PE1_DCR (INTR_UIC3_BASE + 11) // H L
562 #define INTR_UIC3_PE0_INTA (INTR_UIC3_BASE + 12) // H L
563 #define INTR_UIC3_PE0_INTB (INTR_UIC3_BASE + 13) // H L
564 #define INTR_UIC3_PE0_INTC (INTR_UIC3_BASE + 14) // H L
565 #define INTR_UIC3_PE0_INTD (INTR_UIC3_BASE + 15) // H L
566 #define INTR_UIC3_PE1_INTA (INTR_UIC3_BASE + 16) // H L
567 #define INTR_UIC3_PE1_INTB (INTR_UIC3_BASE + 17) // H L
568 #define INTR_UIC3_PE1_INTC (INTR_UIC3_BASE + 18) // H L
569 #define INTR_UIC3_PE1_INTD (INTR_UIC3_BASE + 19) // H L
570 #define INTR_UIC3_EXT_IRQ12 (INTR_UIC3_BASE + 20) // ? ?
571 #define INTR_UIC3_EXT_IRQ13 (INTR_UIC3_BASE + 21) // ? ?
572 #define INTR_UIC3_EXT_IRQ14 (INTR_UIC3_BASE + 22) // ? ?
573 #define INTR_UIC3_EXT_IRQ15 (INTR_UIC3_BASE + 23) // ? ?
574 #define INTR_UIC3_PE_MSI0 (INTR_UIC3_BASE + 24) // R E
575 #define INTR_UIC3_PE_MSI1 (INTR_UIC3_BASE + 25) // R E
576 #define INTR_UIC3_PE_MSI2 (INTR_UIC3_BASE + 26) // R E
577 #define INTR_UIC3_PE_MSI3 (INTR_UIC3_BASE + 27) // R E
578 #define INTR_UIC3_PE_MSI4 (INTR_UIC3_BASE + 28) // R E
579 #define INTR_UIC3_PE_MSI5 (INTR_UIC3_BASE + 29) // R E
580 #define INTR_UIC3_PE_MSI6 (INTR_UIC3_BASE + 30) // R E
581 #define INTR_UIC3_PE_MSI7 (INTR_UIC3_BASE + 31) // R E
585 #define IIC0_XTCNTLSS 0xEF60070F
586 #define IIC0_DIRECTCNTL 0xEF600710
588 #define IIC1_XTCNTLSS 0xEF60080F
589 #define IIC1_DIRECTCNTL 0xEF600810
591 #define IIC_XTCNTLSS_SRST 0x01
593 #define IIC_DIRECTCNTL_SDAC 0x08
594 #define IIC_DIRECTCNTL_SCLC 0x04
595 #define IIC_DIRECTCNTL_MSDA 0x02
596 #define IIC_DIRECTCNTL_MSCL 0x01
599 #define UART0_RBR 0xEF600300
600 #define UART0_THR 0xEF600300
601 #define UART0_IER 0xEF600301
602 #define UART0_IIR 0xEF600302
603 #define UART0_FCR 0xEF600302
604 #define UART0_LCR 0xEF600303
605 #define UART0_MCR 0xEF600304
606 #define UART0_LSR 0xEF600305
607 #define UART0_MSR 0xEF600306
608 #define UART0_SCR 0xEF600307
609 #define UART0_DLL 0xEF600300
610 #define UART0_DLM 0xEF600301
613 #define UART1_RBR 0xEF600400
614 #define UART1_THR 0xEF600400
615 #define UART1_IER 0xEF600401
616 #define UART1_IIR 0xEF600402
617 #define UART1_FCR 0xEF600402
618 #define UART1_LCR 0xEF600403
619 #define UART1_MCR 0xEF600404
620 #define UART1_LSR 0xEF600405
621 #define UART1_MSR 0xEF600406
622 #define UART1_SCR 0xEF600407
623 #define UART1_DLL 0xEF600400
624 #define UART1_DLM 0xEF600401
627 #define UART2_RBR 0xEF600500
628 #define UART2_THR 0xEF600500
629 #define UART2_IER 0xEF600501
630 #define UART2_IIR 0xEF600502
631 #define UART2_FCR 0xEF600502
632 #define UART2_LCR 0xEF600503
633 #define UART2_MCR 0xEF600504
634 #define UART2_LSR 0xEF600505
635 #define UART2_MSR 0xEF600506
636 #define UART2_SCR 0xEF600507
637 #define UART2_DLL 0xEF600500
638 #define UART2_DLM 0xEF600501
641 #define UART3_RBR 0xEF600600
642 #define UART3_THR 0xEF600600
643 #define UART3_IER 0xEF600601
644 #define UART3_IIR 0xEF600602
645 #define UART3_FCR 0xEF600602
646 #define UART3_LCR 0xEF600603
647 #define UART3_MCR 0xEF600604
648 #define UART3_LSR 0xEF600605
649 #define UART3_MSR 0xEF600606
650 #define UART3_SCR 0xEF600607
651 #define UART3_DLL 0xEF600600
652 #define UART3_DLM 0xEF600601
654 #define UART_IER_EDSSI 0x08
655 #define UART_IER_ELSI 0x04
656 #define UART_IER_ETBEI 0x02
657 #define UART_IER_ERBFI 0x01
659 #define UART_IIR_FE 0xc0
660 #define UART_IIR_FE_ENABLED 0xc0
661 #define UART_IIR_FE_DISABLED 0x00
662 #define UART_IIR_INTID 0x0e
663 #define UART_IIR_INTID_4 0x00
664 #define UART_IIR_INTID_3 0x02
665 #define UART_IIR_INTID_2 0x04
666 #define UART_IIR_INITD_1 0x06
667 #define UART_IIR_INTID_0 0x0c
668 #define UART_IIR_INTP 0x01
670 #define UART_FCR_RFTL 0xc0
671 #define UART_FCR_RFTL_01 0x00
672 #define UART_FCR_RFTL_16 0x40
673 #define UART_FCR_RFTL_32 0x80
674 #define UART_FCR_RFTL_56 0xc0
675 #define UART_FCR_DMS 0x08
676 #define UART_FCR_TFR 0x04
677 #define UART_FCR_RFR 0x02
678 #define UART_FCR_FE 0x01
680 #define UART_LCR_DLAB 0x80
681 #define UART_LCR_SB 0x40
682 #define UART_LCR_SP 0x20
683 #define UART_LCR_EPS 0x10
684 #define UART_LCR_PEN 0x08
685 #define UART_LCR_SBS 0x04
686 #define UART_LCR_WLS 0x03
687 #define UART_LCR_WLS_5 0x00
688 #define UART_LCR_WLS_6 0x01
689 #define UART_LCR_WLS_7 0x02
690 #define UART_LCR_WLS_8 0x03
692 #define UART_MCR_AFC 0x20
693 #define UART_MCR_LOOP 0x10
694 #define UART_MCR_OUT2 0x08
695 #define UART_MCR_OUT1 0x04
696 #define UART_MCR_RTS 0x02
697 #define UART_MCR_DTR 0x01
699 #define UART_LSR_RFE 0x80
700 #define UART_LSR_TEMT 0x40
701 #define UART_LSR_THRE 0x20
702 #define UART_LSR_BI 0x10
703 #define UART_LSR_FE 0x08
704 #define UART_LSR_PE 0x04
705 #define UART_LSR_OE 0x02
706 #define UART_LSR_DR 0x01
708 #define UART_MSR_DCD 0x80
709 #define UART_LSR_RI 0x40
710 #define UART_LSR_DSR 0x20
711 #define UART_LSR_CTS 0x10
712 #define UART_LSR_DDCD 0x08
713 #define UART_LSR_TERI 0x04
714 #define UART_LSR_DDSR 0x02
715 #define UART_LSR_DCTS 0x01
717 #define PCI0_IO 0xe8000000
718 #define PCI0_IO_SIZE 0x04000000
719 #define PCI0_MEM 0x80000000
720 #define PCI0_MEM_SIZE 0x20000000
722 #define PCI0_CFGADDR 0xeec00000
723 #define PCI0_CFGDATA 0xeec00004
725 #define PCI0_BAR0L 0xeec80010
726 #define PCI0_BAR0H 0xeec80014
728 #define PCI0_POM0LAL 0xeec80068
729 #define PCI0_POM0LAH 0xeec8006c
730 #define PCI0_POM0SA 0xeec80070
731 #define PCI0_POM0PCIAL 0xeec80074
732 #define PCI0_POM0PCIAH 0xeec80078
734 #define PCI0_POM1LAL 0xeec8007c
735 #define PCI0_POM1LAH 0xeec80080
736 #define PCI0_POM1SA 0xeec80084
737 #define PCI0_POM1PCIAL 0xeec80088
738 #define PCI0_POM1PCIAH 0xeec8008c
740 #define PCI0_PIM0SAL 0xeec80098
741 #define PCI0_PIM0SAH 0xeec800f8
742 #define PCI0_PIM0LAL 0xeec8009c
743 #define PCI0_PIM0LAH 0xeec800a0
745 #define GPT0_TBC 0xef600000
746 #define GPT0_DCT0 0xef600110
747 #define GPT0_DCIS 0xef60011c
748 #define GPT0_DCIS_DCIS 0x80000000
751 #define ZMII_FER 0xef600d00
752 #define ZMII_SSR 0xef600d04
753 #define ZMII_SMIISR 0xef600d08
755 #define ZMII_RMII 0x22000000
756 #define ZMII_MDI0 0x80000000
758 #define ZMII_FER_DIS 0x0
759 #define ZMII_FER_MDI 0x8
760 #define ZMII_FER_SMII 0x4
761 #define ZMII_FER_RMII 0x2
762 #define ZMII_FER_MII 0x1
764 #define ZMII_FER_RSVD11 (0x00200000)
765 #define ZMII_FER_RSVD10 (0x00100000)
766 #define ZMII_FER_RSVD14_31 (0x0003FFFF)
768 #define ZMII_FER_V(__x) (((3 - __x) * 4) + 16)
770 /* ZMII Speed Selection Register Bit Definitions */
771 #define ZMII_SSR_SCI (0x4)
772 #define ZMII_SSR_FSS (0x2)
773 #define ZMII_SSR_SP (0x1)
774 #define ZMII_SSR_RSVD16_31 (0x0000FFFF)
776 #define ZMII_SSR_V(__x) (((3 - __x) * 4) + 16)
778 /* ZMII SMII Status Register Bit Definitions */
779 #define ZMII_SMIISR_E1 (0x80)
780 #define ZMII_SMIISR_EC (0x40)
781 #define ZMII_SMIISR_EN (0x20)
782 #define ZMII_SMIISR_EJ (0x10)
783 #define ZMII_SMIISR_EL (0x08)
784 #define ZMII_SMIISR_ED (0x04)
785 #define ZMII_SMIISR_ES (0x02)
786 #define ZMII_SMIISR_EF (0x01)
788 #define ZMII_SMIISR_V(__x) ((3 - __x) * 8)
792 #define EMAC_TXM0 (8)
793 #define EMAC_TXM1 (12)
794 #define EMAC_RXM (16)
795 #define EMAC_ISR (20)
796 #define EMAC_IER (24)
797 #define EMAC_IAH (28)
798 #define EMAC_IAL (32)
799 #define EMAC_PAUSE_TIME_REG (44)
800 #define EMAC_I_FRAME_GAP_REG (88)
801 #define EMAC_STACR (92)
802 #define EMAC_TRTR (96)
803 #define EMAC_RX_HI_LO_WMARK (100)
805 #define EMAC0_BASE 0xef600e00
806 #define EMAC1_BASE 0xef600f00
808 /* bit definitions */
810 #define EMAC_M0_RXI (0x80000000)
811 #define EMAC_M0_TXI (0x40000000)
812 #define EMAC_M0_SRST (0x20000000)
813 #define EMAC_M0_TXE (0x10000000)
814 #define EMAC_M0_RXE (0x08000000)
815 #define EMAC_M0_WKE (0x04000000)
817 #define EMAC_M1_FDE 0x80000000
818 #define EMAC_M1_ILE 0x40000000
819 #define EMAC_M1_VLE 0x20000000
820 #define EMAC_M1_EIFC 0x10000000
821 #define EMAC_M1_APP 0x08000000
822 #define EMAC_M1_AEMI 0x02000000
823 #define EMAC_M1_IST 0x01000000
824 #define EMAC_M1_MF_1000MBPS 0x00800000 /* 0's for 10MBPS */
825 #define EMAC_M1_MF_100MBPS 0x00400000
826 #define EMAC_M1_RFS_4K 0x00300000 /* ~4k for 512 byte */
827 #define EMAC_M1_RFS_2K 0x00200000
828 #define EMAC_M1_RFS_1K 0x00100000
829 #define EMAC_M1_TX_FIFO_2K 0x00080000 /* 0's for 512 byte */
830 #define EMAC_M1_TX_FIFO_1K 0x00040000
831 #define EMAC_M1_TR0_DEPEND 0x00010000 /* 0'x for single packet */
832 #define EMAC_M1_TR0_MULTI 0x00008000
833 #define EMAC_M1_TR1_DEPEND 0x00004000
834 #define EMAC_M1_TR1_MULTI 0x00002000
835 #define EMAC_M1_JUMBO_ENABLE 0x00001000
837 /* Transmit Mode Register 0 */
838 #define EMAC_TXM0_GNP0 (0x80000000)
839 #define EMAC_TXM0_GNP1 (0x40000000)
840 #define EMAC_TXM0_GNPD (0x20000000)
841 #define EMAC_TXM0_FC (0x10000000)
843 /* Receive Mode Register */
844 #define EMAC_RMR_SP (0x80000000)
845 #define EMAC_RMR_SFCS (0x40000000)
846 #define EMAC_RMR_ARRP (0x20000000)
847 #define EMAC_RMR_ARP (0x10000000)
848 #define EMAC_RMR_AROP (0x08000000)
849 #define EMAC_RMR_ARPI (0x04000000)
850 #define EMAC_RMR_PPP (0x02000000)
851 #define EMAC_RMR_PME (0x01000000)
852 #define EMAC_RMR_PMME (0x00800000)
853 #define EMAC_RMR_IAE (0x00400000)
854 #define EMAC_RMR_MIAE (0x00200000)
855 #define EMAC_RMR_BAE (0x00100000)
856 #define EMAC_RMR_MAE (0x00080000)
858 /* Interrupt Status & enable Regs */
859 #define EMAC_ISR_OVR (0x02000000)
860 #define EMAC_ISR_PP (0x01000000)
861 #define EMAC_ISR_BP (0x00800000)
862 #define EMAC_ISR_RP (0x00400000)
863 #define EMAC_ISR_SE (0x00200000)
864 #define EMAC_ISR_SYE (0x00100000)
865 #define EMAC_ISR_BFCS (0x00080000)
866 #define EMAC_ISR_PTLE (0x00040000)
867 #define EMAC_ISR_ORE (0x00020000)
868 #define EMAC_ISR_IRE (0x00010000)
869 #define EMAC_ISR_DBDM (0x00000200)
870 #define EMAC_ISR_DB0 (0x00000100)
871 #define EMAC_ISR_SE0 (0x00000080)
872 #define EMAC_ISR_TE0 (0x00000040)
873 #define EMAC_ISR_DB1 (0x00000020)
874 #define EMAC_ISR_SE1 (0x00000010)
875 #define EMAC_ISR_TE1 (0x00000008)
876 #define EMAC_ISR_MOS (0x00000002)
877 #define EMAC_ISR_MOF (0x00000001)
879 /* STA CONTROL REG */
880 #define EMAC_STACR_OC (0x00008000)
881 #define EMAC_STACR_PHYE (0x00004000)
882 #define EMAC_STACR_WRITE (0x00002000)
883 #define EMAC_STACR_READ (0x00001000)
884 #define EMAC_STACR_CLK_83MHZ (0x00000800) /* 0's for 50Mhz */
885 #define EMAC_STACR_CLK_66MHZ (0x00000400)
886 #define EMAC_STACR_CLK_100MHZ (0x00000C00)
888 #define EMAC_STACR_OC_MASK (0x00000000)
890 /* Transmit Request Threshold Register */
891 #define EMAC_TRTR_256 (0x18000000) /* 0's for 64 Bytes */
892 #define EMAC_TRTR_192 (0x10000000)
893 #define EMAC_TRTR_128 (0x01000000)
895 /* the follwing defines are for the MadMAL status and control registers. */
896 #define EMAC_TX_CTRL_GFCS (0x0200)
897 #define EMAC_TX_CTRL_GP (0x0100)
898 #define EMAC_TX_CTRL_ISA (0x0080)
899 #define EMAC_TX_CTRL_RSA (0x0040)
900 #define EMAC_TX_CTRL_IVT (0x0020)
901 #define EMAC_TX_CTRL_RVT (0x0010)
903 #define EMAC_TX_CTRL_DEFAULT (EMAC_TX_CTRL_GFCS |EMAC_TX_CTRL_GP)
905 #define EMAC_TX_ST_BFCS (0x0200)
906 #define EMAC_TX_ST_BPP (0x0100)
907 #define EMAC_TX_ST_LCS (0x0080)
908 #define EMAC_TX_ST_ED (0x0040)
909 #define EMAC_TX_ST_EC (0x0020)
910 #define EMAC_TX_ST_LC (0x0010)
911 #define EMAC_TX_ST_MC (0x0008)
912 #define EMAC_TX_ST_SC (0x0004)
913 #define EMAC_TX_ST_UR (0x0002)
914 #define EMAC_TX_ST_SQE (0x0001)
916 #define EMAC_TX_ST_DEFAULT (0x03F3)
918 /* madmal receive status / Control bits */
920 #define EMAC_RX_ST_OE (0x0200)
921 #define EMAC_RX_ST_PP (0x0100)
922 #define EMAC_RX_ST_BP (0x0080)
923 #define EMAC_RX_ST_RP (0x0040)
924 #define EMAC_RX_ST_SE (0x0020)
925 #define EMAC_RX_ST_AE (0x0010)
926 #define EMAC_RX_ST_BFCS (0x0008)
927 #define EMAC_RX_ST_PTL (0x0004)
928 #define EMAC_RX_ST_ORE (0x0002)
929 #define EMAC_RX_ST_IRE (0x0001)
930 /* all the errors we care about */
931 #define EMAC_RX_ERRORS (0x03FF)
934 #define OHCI0_HCREV (0xef000000) /* 0x4 bffd0000 */
935 #define EHCI0_HCCAPBASE (0xef000400) /* 0x4 bffd0400 */
937 /* AMCC460 IDE/SATA */
938 #define SATA0_CDR0 (0xef001000) /* 0x4 bffd1000 */
939 #define SATA0_SCR0 (0xef001024) /* 0x4 bffd1024 */
940 #define SATA0_SCR2 (0xef00102c) /* 0x4 bffd102c */
942 #endif /*ASM_AMCC440_H*/