diff options
author | Pete Popov <ppopov@embeddedalley.com> | 2005-03-01 01:33:16 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-10-29 14:30:47 -0400 |
commit | e3ad1c23ba72214669b364c6fa304531dc768c3e (patch) | |
tree | bc1e0004d3df66b4c37a2deb8d89431657039719 /include/asm-mips/mach-au1x00/au1000.h | |
parent | 784f7b9d895893c6aa3ca471c1344a62fc29c285 (diff) |
Base Au1200 2.6 support.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips/mach-au1x00/au1000.h')
-rw-r--r-- | include/asm-mips/mach-au1x00/au1000.h | 556 |
1 files changed, 497 insertions, 59 deletions
diff --git a/include/asm-mips/mach-au1x00/au1000.h b/include/asm-mips/mach-au1x00/au1000.h index 148bae2fa7d3..28b04a5f67cf 100644 --- a/include/asm-mips/mach-au1x00/au1000.h +++ b/include/asm-mips/mach-au1x00/au1000.h | |||
@@ -162,27 +162,355 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; | |||
162 | #define ALLINTS (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4 | IE_IRQ5) | 162 | #define ALLINTS (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4 | IE_IRQ5) |
163 | #endif | 163 | #endif |
164 | 164 | ||
165 | /* SDRAM Controller */ | 165 | /* |
166 | * SDRAM Register Offsets | ||
167 | */ | ||
166 | #if defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1100) | 168 | #if defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1100) |
167 | #define MEM_SDMODE0 0xB4000000 | 169 | #define MEM_SDMODE0 (0x0000) |
168 | #define MEM_SDMODE1 0xB4000004 | 170 | #define MEM_SDMODE1 (0x0004) |
169 | #define MEM_SDMODE2 0xB4000008 | 171 | #define MEM_SDMODE2 (0x0008) |
172 | #define MEM_SDADDR0 (0x000C) | ||
173 | #define MEM_SDADDR1 (0x0010) | ||
174 | #define MEM_SDADDR2 (0x0014) | ||
175 | #define MEM_SDREFCFG (0x0018) | ||
176 | #define MEM_SDPRECMD (0x001C) | ||
177 | #define MEM_SDAUTOREF (0x0020) | ||
178 | #define MEM_SDWRMD0 (0x0024) | ||
179 | #define MEM_SDWRMD1 (0x0028) | ||
180 | #define MEM_SDWRMD2 (0x002C) | ||
181 | #define MEM_SDSLEEP (0x0030) | ||
182 | #define MEM_SDSMCKE (0x0034) | ||
183 | |||
184 | #ifndef ASSEMBLER | ||
185 | /*typedef volatile struct | ||
186 | { | ||
187 | uint32 sdmode0; | ||
188 | uint32 sdmode1; | ||
189 | uint32 sdmode2; | ||
190 | uint32 sdaddr0; | ||
191 | uint32 sdaddr1; | ||
192 | uint32 sdaddr2; | ||
193 | uint32 sdrefcfg; | ||
194 | uint32 sdautoref; | ||
195 | uint32 sdwrmd0; | ||
196 | uint32 sdwrmd1; | ||
197 | uint32 sdwrmd2; | ||
198 | uint32 sdsleep; | ||
199 | uint32 sdsmcke; | ||
200 | |||
201 | } AU1X00_SDRAM;*/ | ||
202 | #endif | ||
203 | |||
204 | /* | ||
205 | * MEM_SDMODE register content definitions | ||
206 | */ | ||
207 | #define MEM_SDMODE_F (1<<22) | ||
208 | #define MEM_SDMODE_SR (1<<21) | ||
209 | #define MEM_SDMODE_BS (1<<20) | ||
210 | #define MEM_SDMODE_RS (3<<18) | ||
211 | #define MEM_SDMODE_CS (7<<15) | ||
212 | #define MEM_SDMODE_TRAS (15<<11) | ||
213 | #define MEM_SDMODE_TMRD (3<<9) | ||
214 | #define MEM_SDMODE_TWR (3<<7) | ||
215 | #define MEM_SDMODE_TRP (3<<5) | ||
216 | #define MEM_SDMODE_TRCD (3<<3) | ||
217 | #define MEM_SDMODE_TCL (7<<0) | ||
218 | |||
219 | #define MEM_SDMODE_BS_2Bank (0<<20) | ||
220 | #define MEM_SDMODE_BS_4Bank (1<<20) | ||
221 | #define MEM_SDMODE_RS_11Row (0<<18) | ||
222 | #define MEM_SDMODE_RS_12Row (1<<18) | ||
223 | #define MEM_SDMODE_RS_13Row (2<<18) | ||
224 | #define MEM_SDMODE_RS_N(N) ((N)<<18) | ||
225 | #define MEM_SDMODE_CS_7Col (0<<15) | ||
226 | #define MEM_SDMODE_CS_8Col (1<<15) | ||
227 | #define MEM_SDMODE_CS_9Col (2<<15) | ||
228 | #define MEM_SDMODE_CS_10Col (3<<15) | ||
229 | #define MEM_SDMODE_CS_11Col (4<<15) | ||
230 | #define MEM_SDMODE_CS_N(N) ((N)<<15) | ||
231 | #define MEM_SDMODE_TRAS_N(N) ((N)<<11) | ||
232 | #define MEM_SDMODE_TMRD_N(N) ((N)<<9) | ||
233 | #define MEM_SDMODE_TWR_N(N) ((N)<<7) | ||
234 | #define MEM_SDMODE_TRP_N(N) ((N)<<5) | ||
235 | #define MEM_SDMODE_TRCD_N(N) ((N)<<3) | ||
236 | #define MEM_SDMODE_TCL_N(N) ((N)<<0) | ||
237 | |||
238 | /* | ||
239 | * MEM_SDADDR register contents definitions | ||
240 | */ | ||
241 | #define MEM_SDADDR_E (1<<20) | ||
242 | #define MEM_SDADDR_CSBA (0x03FF<<10) | ||
243 | #define MEM_SDADDR_CSMASK (0x03FF<<0) | ||
244 | #define MEM_SDADDR_CSBA_N(N) ((N)&(0x03FF<<22)>>12) | ||
245 | #define MEM_SDADDR_CSMASK_N(N) ((N)&(0x03FF<<22)>>22) | ||
246 | |||
247 | /* | ||
248 | * MEM_SDREFCFG register content definitions | ||
249 | */ | ||
250 | #define MEM_SDREFCFG_TRC (15<<28) | ||
251 | #define MEM_SDREFCFG_TRPM (3<<26) | ||
252 | #define MEM_SDREFCFG_E (1<<25) | ||
253 | #define MEM_SDREFCFG_RE (0x1ffffff<<0) | ||
254 | #define MEM_SDREFCFG_TRC_N(N) ((N)<<MEM_SDREFCFG_TRC) | ||
255 | #define MEM_SDREFCFG_TRPM_N(N) ((N)<<MEM_SDREFCFG_TRPM) | ||
256 | #define MEM_SDREFCFG_REF_N(N) (N) | ||
257 | #endif | ||
170 | 258 | ||
171 | #define MEM_SDADDR0 0xB400000C | 259 | /***********************************************************************/ |
172 | #define MEM_SDADDR1 0xB4000010 | ||
173 | #define MEM_SDADDR2 0xB4000014 | ||
174 | 260 | ||
175 | #define MEM_SDREFCFG 0xB4000018 | 261 | /* |
176 | #define MEM_SDPRECMD 0xB400001C | 262 | * Au1550 SDRAM Register Offsets |
177 | #define MEM_SDAUTOREF 0xB4000020 | 263 | */ |
178 | 264 | ||
179 | #define MEM_SDWRMD0 0xB4000024 | 265 | /***********************************************************************/ |
180 | #define MEM_SDWRMD1 0xB4000028 | ||
181 | #define MEM_SDWRMD2 0xB400002C | ||
182 | 266 | ||
183 | #define MEM_SDSLEEP 0xB4000030 | 267 | #if defined(CONFIG_SOC_AU1550) || defined(CONFIG_SOC_AU1200) |
184 | #define MEM_SDSMCKE 0xB4000034 | 268 | #define MEM_SDMODE0 (0x0800) |
269 | #define MEM_SDMODE1 (0x0808) | ||
270 | #define MEM_SDMODE2 (0x0810) | ||
271 | #define MEM_SDADDR0 (0x0820) | ||
272 | #define MEM_SDADDR1 (0x0828) | ||
273 | #define MEM_SDADDR2 (0x0830) | ||
274 | #define MEM_SDCONFIGA (0x0840) | ||
275 | #define MEM_SDCONFIGB (0x0848) | ||
276 | #define MEM_SDSTAT (0x0850) | ||
277 | #define MEM_SDERRADDR (0x0858) | ||
278 | #define MEM_SDSTRIDE0 (0x0860) | ||
279 | #define MEM_SDSTRIDE1 (0x0868) | ||
280 | #define MEM_SDSTRIDE2 (0x0870) | ||
281 | #define MEM_SDWRMD0 (0x0880) | ||
282 | #define MEM_SDWRMD1 (0x0888) | ||
283 | #define MEM_SDWRMD2 (0x0890) | ||
284 | #define MEM_SDPRECMD (0x08C0) | ||
285 | #define MEM_SDAUTOREF (0x08C8) | ||
286 | #define MEM_SDSREF (0x08D0) | ||
287 | #define MEM_SDSLEEP MEM_SDSREF | ||
288 | |||
289 | #ifndef ASSEMBLER | ||
290 | /*typedef volatile struct | ||
291 | { | ||
292 | uint32 sdmode0; | ||
293 | uint32 reserved0; | ||
294 | uint32 sdmode1; | ||
295 | uint32 reserved1; | ||
296 | uint32 sdmode2; | ||
297 | uint32 reserved2[3]; | ||
298 | uint32 sdaddr0; | ||
299 | uint32 reserved3; | ||
300 | uint32 sdaddr1; | ||
301 | uint32 reserved4; | ||
302 | uint32 sdaddr2; | ||
303 | uint32 reserved5[3]; | ||
304 | uint32 sdconfiga; | ||
305 | uint32 reserved6; | ||
306 | uint32 sdconfigb; | ||
307 | uint32 reserved7; | ||
308 | uint32 sdstat; | ||
309 | uint32 reserved8; | ||
310 | uint32 sderraddr; | ||
311 | uint32 reserved9; | ||
312 | uint32 sdstride0; | ||
313 | uint32 reserved10; | ||
314 | uint32 sdstride1; | ||
315 | uint32 reserved11; | ||
316 | uint32 sdstride2; | ||
317 | uint32 reserved12[3]; | ||
318 | uint32 sdwrmd0; | ||
319 | uint32 reserved13; | ||
320 | uint32 sdwrmd1; | ||
321 | uint32 reserved14; | ||
322 | uint32 sdwrmd2; | ||
323 | uint32 reserved15[11]; | ||
324 | uint32 sdprecmd; | ||
325 | uint32 reserved16; | ||
326 | uint32 sdautoref; | ||
327 | uint32 reserved17; | ||
328 | uint32 sdsref; | ||
329 | |||
330 | } AU1550_SDRAM;*/ | ||
185 | #endif | 331 | #endif |
332 | #endif | ||
333 | |||
334 | /* | ||
335 | * Physical base addresses for integrated peripherals | ||
336 | */ | ||
337 | |||
338 | #ifdef CONFIG_SOC_AU1000 | ||
339 | #define MEM_PHYS_ADDR 0x14000000 | ||
340 | #define STATIC_MEM_PHYS_ADDR 0x14001000 | ||
341 | #define DMA0_PHYS_ADDR 0x14002000 | ||
342 | #define DMA1_PHYS_ADDR 0x14002100 | ||
343 | #define DMA2_PHYS_ADDR 0x14002200 | ||
344 | #define DMA3_PHYS_ADDR 0x14002300 | ||
345 | #define DMA4_PHYS_ADDR 0x14002400 | ||
346 | #define DMA5_PHYS_ADDR 0x14002500 | ||
347 | #define DMA6_PHYS_ADDR 0x14002600 | ||
348 | #define DMA7_PHYS_ADDR 0x14002700 | ||
349 | #define IC0_PHYS_ADDR 0x10400000 | ||
350 | #define IC1_PHYS_ADDR 0x11800000 | ||
351 | #define AC97_PHYS_ADDR 0x10000000 | ||
352 | #define USBH_PHYS_ADDR 0x10100000 | ||
353 | #define USBD_PHYS_ADDR 0x10200000 | ||
354 | #define IRDA_PHYS_ADDR 0x10300000 | ||
355 | #define MAC0_PHYS_ADDR 0x10500000 | ||
356 | #define MAC1_PHYS_ADDR 0x10510000 | ||
357 | #define MACEN_PHYS_ADDR 0x10520000 | ||
358 | #define MACDMA0_PHYS_ADDR 0x14004000 | ||
359 | #define MACDMA1_PHYS_ADDR 0x14004200 | ||
360 | #define I2S_PHYS_ADDR 0x11000000 | ||
361 | #define UART0_PHYS_ADDR 0x11100000 | ||
362 | #define UART1_PHYS_ADDR 0x11200000 | ||
363 | #define UART2_PHYS_ADDR 0x11300000 | ||
364 | #define UART3_PHYS_ADDR 0x11400000 | ||
365 | #define SSI0_PHYS_ADDR 0x11600000 | ||
366 | #define SSI1_PHYS_ADDR 0x11680000 | ||
367 | #define SYS_PHYS_ADDR 0x11900000 | ||
368 | #define PCMCIA_IO_PHYS_ADDR 0xF00000000 | ||
369 | #define PCMCIA_ATTR_PHYS_ADDR 0xF40000000 | ||
370 | #define PCMCIA_MEM_PHYS_ADDR 0xF80000000 | ||
371 | #endif | ||
372 | |||
373 | /********************************************************************/ | ||
374 | |||
375 | #ifdef CONFIG_SOC_AU1500 | ||
376 | #define MEM_PHYS_ADDR 0x14000000 | ||
377 | #define STATIC_MEM_PHYS_ADDR 0x14001000 | ||
378 | #define DMA0_PHYS_ADDR 0x14002000 | ||
379 | #define DMA1_PHYS_ADDR 0x14002100 | ||
380 | #define DMA2_PHYS_ADDR 0x14002200 | ||
381 | #define DMA3_PHYS_ADDR 0x14002300 | ||
382 | #define DMA4_PHYS_ADDR 0x14002400 | ||
383 | #define DMA5_PHYS_ADDR 0x14002500 | ||
384 | #define DMA6_PHYS_ADDR 0x14002600 | ||
385 | #define DMA7_PHYS_ADDR 0x14002700 | ||
386 | #define IC0_PHYS_ADDR 0x10400000 | ||
387 | #define IC1_PHYS_ADDR 0x11800000 | ||
388 | #define AC97_PHYS_ADDR 0x10000000 | ||
389 | #define USBH_PHYS_ADDR 0x10100000 | ||
390 | #define USBD_PHYS_ADDR 0x10200000 | ||
391 | #define PCI_PHYS_ADDR 0x14005000 | ||
392 | #define MAC0_PHYS_ADDR 0x11500000 | ||
393 | #define MAC1_PHYS_ADDR 0x11510000 | ||
394 | #define MACEN_PHYS_ADDR 0x11520000 | ||
395 | #define MACDMA0_PHYS_ADDR 0x14004000 | ||
396 | #define MACDMA1_PHYS_ADDR 0x14004200 | ||
397 | #define I2S_PHYS_ADDR 0x11000000 | ||
398 | #define UART0_PHYS_ADDR 0x11100000 | ||
399 | #define UART3_PHYS_ADDR 0x11400000 | ||
400 | #define GPIO2_PHYS_ADDR 0x11700000 | ||
401 | #define SYS_PHYS_ADDR 0x11900000 | ||
402 | #define PCI_MEM_PHYS_ADDR 0x400000000 | ||
403 | #define PCI_IO_PHYS_ADDR 0x500000000 | ||
404 | #define PCI_CONFIG0_PHYS_ADDR 0x600000000 | ||
405 | #define PCI_CONFIG1_PHYS_ADDR 0x680000000 | ||
406 | #define PCMCIA_IO_PHYS_ADDR 0xF00000000 | ||
407 | #define PCMCIA_ATTR_PHYS_ADDR 0xF40000000 | ||
408 | #define PCMCIA_MEM_PHYS_ADDR 0xF80000000 | ||
409 | #endif | ||
410 | |||
411 | /********************************************************************/ | ||
412 | |||
413 | #ifdef CONFIG_SOC_AU1100 | ||
414 | #define MEM_PHYS_ADDR 0x14000000 | ||
415 | #define STATIC_MEM_PHYS_ADDR 0x14001000 | ||
416 | #define DMA0_PHYS_ADDR 0x14002000 | ||
417 | #define DMA1_PHYS_ADDR 0x14002100 | ||
418 | #define DMA2_PHYS_ADDR 0x14002200 | ||
419 | #define DMA3_PHYS_ADDR 0x14002300 | ||
420 | #define DMA4_PHYS_ADDR 0x14002400 | ||
421 | #define DMA5_PHYS_ADDR 0x14002500 | ||
422 | #define DMA6_PHYS_ADDR 0x14002600 | ||
423 | #define DMA7_PHYS_ADDR 0x14002700 | ||
424 | #define IC0_PHYS_ADDR 0x10400000 | ||
425 | #define SD0_PHYS_ADDR 0x10600000 | ||
426 | #define SD1_PHYS_ADDR 0x10680000 | ||
427 | #define IC1_PHYS_ADDR 0x11800000 | ||
428 | #define AC97_PHYS_ADDR 0x10000000 | ||
429 | #define USBH_PHYS_ADDR 0x10100000 | ||
430 | #define USBD_PHYS_ADDR 0x10200000 | ||
431 | #define IRDA_PHYS_ADDR 0x10300000 | ||
432 | #define MAC0_PHYS_ADDR 0x10500000 | ||
433 | #define MACEN_PHYS_ADDR 0x10520000 | ||
434 | #define MACDMA0_PHYS_ADDR 0x14004000 | ||
435 | #define MACDMA1_PHYS_ADDR 0x14004200 | ||
436 | #define I2S_PHYS_ADDR 0x11000000 | ||
437 | #define UART0_PHYS_ADDR 0x11100000 | ||
438 | #define UART1_PHYS_ADDR 0x11200000 | ||
439 | #define UART3_PHYS_ADDR 0x11400000 | ||
440 | #define SSI0_PHYS_ADDR 0x11600000 | ||
441 | #define SSI1_PHYS_ADDR 0x11680000 | ||
442 | #define GPIO2_PHYS_ADDR 0x11700000 | ||
443 | #define SYS_PHYS_ADDR 0x11900000 | ||
444 | #define LCD_PHYS_ADDR 0x15000000 | ||
445 | #define PCMCIA_IO_PHYS_ADDR 0xF00000000 | ||
446 | #define PCMCIA_ATTR_PHYS_ADDR 0xF40000000 | ||
447 | #define PCMCIA_MEM_PHYS_ADDR 0xF80000000 | ||
448 | #endif | ||
449 | |||
450 | /***********************************************************************/ | ||
451 | |||
452 | #ifdef CONFIG_SOC_AU1550 | ||
453 | #define MEM_PHYS_ADDR 0x14000000 | ||
454 | #define STATIC_MEM_PHYS_ADDR 0x14001000 | ||
455 | #define IC0_PHYS_ADDR 0x10400000 | ||
456 | #define IC1_PHYS_ADDR 0x11800000 | ||
457 | #define USBH_PHYS_ADDR 0x14020000 | ||
458 | #define USBD_PHYS_ADDR 0x10200000 | ||
459 | #define PCI_PHYS_ADDR 0x14005000 | ||
460 | #define MAC0_PHYS_ADDR 0x10500000 | ||
461 | #define MAC1_PHYS_ADDR 0x10510000 | ||
462 | #define MACEN_PHYS_ADDR 0x10520000 | ||
463 | #define MACDMA0_PHYS_ADDR 0x14004000 | ||
464 | #define MACDMA1_PHYS_ADDR 0x14004200 | ||
465 | #define UART0_PHYS_ADDR 0x11100000 | ||
466 | #define UART1_PHYS_ADDR 0x11200000 | ||
467 | #define UART3_PHYS_ADDR 0x11400000 | ||
468 | #define GPIO2_PHYS_ADDR 0x11700000 | ||
469 | #define SYS_PHYS_ADDR 0x11900000 | ||
470 | #define DDMA_PHYS_ADDR 0x14002000 | ||
471 | #define PE_PHYS_ADDR 0x14008000 | ||
472 | #define PSC0_PHYS_ADDR 0x11A00000 | ||
473 | #define PSC1_PHYS_ADDR 0x11B00000 | ||
474 | #define PSC2_PHYS_ADDR 0x10A00000 | ||
475 | #define PSC3_PHYS_ADDR 0x10B00000 | ||
476 | #define PCI_MEM_PHYS_ADDR 0x400000000 | ||
477 | #define PCI_IO_PHYS_ADDR 0x500000000 | ||
478 | #define PCI_CONFIG0_PHYS_ADDR 0x600000000 | ||
479 | #define PCI_CONFIG1_PHYS_ADDR 0x680000000 | ||
480 | #define PCMCIA_IO_PHYS_ADDR 0xF00000000 | ||
481 | #define PCMCIA_ATTR_PHYS_ADDR 0xF40000000 | ||
482 | #define PCMCIA_MEM_PHYS_ADDR 0xF80000000 | ||
483 | #endif | ||
484 | |||
485 | /***********************************************************************/ | ||
486 | |||
487 | #ifdef CONFIG_SOC_AU1200 | ||
488 | #define MEM_PHYS_ADDR 0x14000000 | ||
489 | #define STATIC_MEM_PHYS_ADDR 0x14001000 | ||
490 | #define AES_PHYS_ADDR 0x10300000 | ||
491 | #define CIM_PHYS_ADDR 0x14004000 | ||
492 | #define IC0_PHYS_ADDR 0x10400000 | ||
493 | #define IC1_PHYS_ADDR 0x11800000 | ||
494 | #define USBM_PHYS_ADDR 0x14020000 | ||
495 | #define USBH_PHYS_ADDR 0x14020100 | ||
496 | #define UART0_PHYS_ADDR 0x11100000 | ||
497 | #define UART1_PHYS_ADDR 0x11200000 | ||
498 | #define GPIO2_PHYS_ADDR 0x11700000 | ||
499 | #define SYS_PHYS_ADDR 0x11900000 | ||
500 | #define DDMA_PHYS_ADDR 0x14002000 | ||
501 | #define PSC0_PHYS_ADDR 0x11A00000 | ||
502 | #define PSC1_PHYS_ADDR 0x11B00000 | ||
503 | #define PCMCIA_IO_PHYS_ADDR 0xF00000000 | ||
504 | #define PCMCIA_ATTR_PHYS_ADDR 0xF40000000 | ||
505 | #define PCMCIA_MEM_PHYS_ADDR 0xF80000000 | ||
506 | #define SD0_PHYS_ADDR 0x10600000 | ||
507 | #define SD1_PHYS_ADDR 0x10680000 | ||
508 | #define LCD_PHYS_ADDR 0x15000000 | ||
509 | #define SWCNT_PHYS_ADDR 0x1110010C | ||
510 | #define MAEFE_PHYS_ADDR 0x14012000 | ||
511 | #define MAEBE_PHYS_ADDR 0x14010000 | ||
512 | #endif | ||
513 | |||
186 | 514 | ||
187 | /* Static Bus Controller */ | 515 | /* Static Bus Controller */ |
188 | #define MEM_STCFG0 0xB4001000 | 516 | #define MEM_STCFG0 0xB4001000 |
@@ -369,7 +697,7 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; | |||
369 | #define AU1000_MAC0_ENABLE 0xB0520000 | 697 | #define AU1000_MAC0_ENABLE 0xB0520000 |
370 | #define AU1000_MAC1_ENABLE 0xB0520004 | 698 | #define AU1000_MAC1_ENABLE 0xB0520004 |
371 | #define NUM_ETH_INTERFACES 2 | 699 | #define NUM_ETH_INTERFACES 2 |
372 | #endif // CONFIG_SOC_AU1000 | 700 | #endif /* CONFIG_SOC_AU1000 */ |
373 | 701 | ||
374 | /* Au1500 */ | 702 | /* Au1500 */ |
375 | #ifdef CONFIG_SOC_AU1500 | 703 | #ifdef CONFIG_SOC_AU1500 |
@@ -440,7 +768,7 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; | |||
440 | #define AU1500_MAC0_ENABLE 0xB1520000 | 768 | #define AU1500_MAC0_ENABLE 0xB1520000 |
441 | #define AU1500_MAC1_ENABLE 0xB1520004 | 769 | #define AU1500_MAC1_ENABLE 0xB1520004 |
442 | #define NUM_ETH_INTERFACES 2 | 770 | #define NUM_ETH_INTERFACES 2 |
443 | #endif // CONFIG_SOC_AU1500 | 771 | #endif /* CONFIG_SOC_AU1500 */ |
444 | 772 | ||
445 | /* Au1100 */ | 773 | /* Au1100 */ |
446 | #ifdef CONFIG_SOC_AU1100 | 774 | #ifdef CONFIG_SOC_AU1100 |
@@ -485,6 +813,22 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; | |||
485 | #define AU1000_GPIO_13 45 | 813 | #define AU1000_GPIO_13 45 |
486 | #define AU1000_GPIO_14 46 | 814 | #define AU1000_GPIO_14 46 |
487 | #define AU1000_GPIO_15 47 | 815 | #define AU1000_GPIO_15 47 |
816 | #define AU1000_GPIO_16 48 | ||
817 | #define AU1000_GPIO_17 49 | ||
818 | #define AU1000_GPIO_18 50 | ||
819 | #define AU1000_GPIO_19 51 | ||
820 | #define AU1000_GPIO_20 52 | ||
821 | #define AU1000_GPIO_21 53 | ||
822 | #define AU1000_GPIO_22 54 | ||
823 | #define AU1000_GPIO_23 55 | ||
824 | #define AU1000_GPIO_24 56 | ||
825 | #define AU1000_GPIO_25 57 | ||
826 | #define AU1000_GPIO_26 58 | ||
827 | #define AU1000_GPIO_27 59 | ||
828 | #define AU1000_GPIO_28 60 | ||
829 | #define AU1000_GPIO_29 61 | ||
830 | #define AU1000_GPIO_30 62 | ||
831 | #define AU1000_GPIO_31 63 | ||
488 | 832 | ||
489 | #define UART0_ADDR 0xB1100000 | 833 | #define UART0_ADDR 0xB1100000 |
490 | #define UART1_ADDR 0xB1200000 | 834 | #define UART1_ADDR 0xB1200000 |
@@ -496,7 +840,7 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; | |||
496 | #define AU1100_ETH0_BASE 0xB0500000 | 840 | #define AU1100_ETH0_BASE 0xB0500000 |
497 | #define AU1100_MAC0_ENABLE 0xB0520000 | 841 | #define AU1100_MAC0_ENABLE 0xB0520000 |
498 | #define NUM_ETH_INTERFACES 1 | 842 | #define NUM_ETH_INTERFACES 1 |
499 | #endif // CONFIG_SOC_AU1100 | 843 | #endif /* CONFIG_SOC_AU1100 */ |
500 | 844 | ||
501 | #ifdef CONFIG_SOC_AU1550 | 845 | #ifdef CONFIG_SOC_AU1550 |
502 | #define AU1550_UART0_INT 0 | 846 | #define AU1550_UART0_INT 0 |
@@ -513,14 +857,14 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; | |||
513 | #define AU1550_PSC1_INT 11 | 857 | #define AU1550_PSC1_INT 11 |
514 | #define AU1550_PSC2_INT 12 | 858 | #define AU1550_PSC2_INT 12 |
515 | #define AU1550_PSC3_INT 13 | 859 | #define AU1550_PSC3_INT 13 |
516 | #define AU1550_TOY_INT 14 | 860 | #define AU1000_TOY_INT 14 |
517 | #define AU1550_TOY_MATCH0_INT 15 | 861 | #define AU1000_TOY_MATCH0_INT 15 |
518 | #define AU1550_TOY_MATCH1_INT 16 | 862 | #define AU1000_TOY_MATCH1_INT 16 |
519 | #define AU1550_TOY_MATCH2_INT 17 | 863 | #define AU1000_TOY_MATCH2_INT 17 |
520 | #define AU1550_RTC_INT 18 | 864 | #define AU1000_RTC_INT 18 |
521 | #define AU1550_RTC_MATCH0_INT 19 | 865 | #define AU1000_RTC_MATCH0_INT 19 |
522 | #define AU1550_RTC_MATCH1_INT 20 | 866 | #define AU1000_RTC_MATCH1_INT 20 |
523 | #define AU1550_RTC_MATCH2_INT 21 | 867 | #define AU1000_RTC_MATCH2_INT 21 |
524 | #define AU1550_NAND_INT 23 | 868 | #define AU1550_NAND_INT 23 |
525 | #define AU1550_USB_DEV_REQ_INT 24 | 869 | #define AU1550_USB_DEV_REQ_INT 24 |
526 | #define AU1550_USB_DEV_SUS_INT 25 | 870 | #define AU1550_USB_DEV_SUS_INT 25 |
@@ -575,7 +919,7 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; | |||
575 | #define AU1550_MAC0_ENABLE 0xB0520000 | 919 | #define AU1550_MAC0_ENABLE 0xB0520000 |
576 | #define AU1550_MAC1_ENABLE 0xB0520004 | 920 | #define AU1550_MAC1_ENABLE 0xB0520004 |
577 | #define NUM_ETH_INTERFACES 2 | 921 | #define NUM_ETH_INTERFACES 2 |
578 | #endif // CONFIG_SOC_AU1550 | 922 | #endif /* CONFIG_SOC_AU1550 */ |
579 | 923 | ||
580 | #ifdef CONFIG_SOC_AU1200 | 924 | #ifdef CONFIG_SOC_AU1200 |
581 | #define AU1200_UART0_INT 0 | 925 | #define AU1200_UART0_INT 0 |
@@ -592,14 +936,14 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; | |||
592 | #define AU1200_PSC1_INT 11 | 936 | #define AU1200_PSC1_INT 11 |
593 | #define AU1200_AES_INT 12 | 937 | #define AU1200_AES_INT 12 |
594 | #define AU1200_CAMERA_INT 13 | 938 | #define AU1200_CAMERA_INT 13 |
595 | #define AU1200_TOY_INT 14 | 939 | #define AU1000_TOY_INT 14 |
596 | #define AU1200_TOY_MATCH0_INT 15 | 940 | #define AU1000_TOY_MATCH0_INT 15 |
597 | #define AU1200_TOY_MATCH1_INT 16 | 941 | #define AU1000_TOY_MATCH1_INT 16 |
598 | #define AU1200_TOY_MATCH2_INT 17 | 942 | #define AU1000_TOY_MATCH2_INT 17 |
599 | #define AU1200_RTC_INT 18 | 943 | #define AU1000_RTC_INT 18 |
600 | #define AU1200_RTC_MATCH0_INT 19 | 944 | #define AU1000_RTC_MATCH0_INT 19 |
601 | #define AU1200_RTC_MATCH1_INT 20 | 945 | #define AU1000_RTC_MATCH1_INT 20 |
602 | #define AU1200_RTC_MATCH2_INT 21 | 946 | #define AU1000_RTC_MATCH2_INT 21 |
603 | #define AU1200_NAND_INT 23 | 947 | #define AU1200_NAND_INT 23 |
604 | #define AU1200_GPIO_204 24 | 948 | #define AU1200_GPIO_204 24 |
605 | #define AU1200_GPIO_205 25 | 949 | #define AU1200_GPIO_205 25 |
@@ -607,6 +951,7 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; | |||
607 | #define AU1200_GPIO_207 27 | 951 | #define AU1200_GPIO_207 27 |
608 | #define AU1200_GPIO_208_215 28 // Logical OR of 208:215 | 952 | #define AU1200_GPIO_208_215 28 // Logical OR of 208:215 |
609 | #define AU1200_USB_INT 29 | 953 | #define AU1200_USB_INT 29 |
954 | #define AU1000_USB_HOST_INT AU1200_USB_INT | ||
610 | #define AU1200_LCD_INT 30 | 955 | #define AU1200_LCD_INT 30 |
611 | #define AU1200_MAE_BOTH_INT 31 | 956 | #define AU1200_MAE_BOTH_INT 31 |
612 | #define AU1000_GPIO_0 32 | 957 | #define AU1000_GPIO_0 32 |
@@ -645,21 +990,36 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; | |||
645 | #define UART0_ADDR 0xB1100000 | 990 | #define UART0_ADDR 0xB1100000 |
646 | #define UART1_ADDR 0xB1200000 | 991 | #define UART1_ADDR 0xB1200000 |
647 | 992 | ||
648 | #define USB_OHCI_BASE 0x14020000 // phys addr for ioremap | 993 | #define USB_UOC_BASE 0x14020020 |
649 | #define USB_HOST_CONFIG 0xB4027ffc | 994 | #define USB_UOC_LEN 0x20 |
650 | 995 | #define USB_OHCI_BASE 0x14020100 | |
651 | // these are here for prototyping on au1550 (do not exist on au1200) | 996 | #define USB_OHCI_LEN 0x100 |
652 | #define AU1200_ETH0_BASE 0xB0500000 | 997 | #define USB_EHCI_BASE 0x14020200 |
653 | #define AU1200_ETH1_BASE 0xB0510000 | 998 | #define USB_EHCI_LEN 0x100 |
654 | #define AU1200_MAC0_ENABLE 0xB0520000 | 999 | #define USB_UDC_BASE 0x14022000 |
655 | #define AU1200_MAC1_ENABLE 0xB0520004 | 1000 | #define USB_UDC_LEN 0x2000 |
656 | #define NUM_ETH_INTERFACES 2 | 1001 | #define USB_MSR_BASE 0xB4020000 |
657 | #endif // CONFIG_SOC_AU1200 | 1002 | #define USB_MSR_MCFG 4 |
1003 | #define USBMSRMCFG_OMEMEN 0 | ||
1004 | #define USBMSRMCFG_OBMEN 1 | ||
1005 | #define USBMSRMCFG_EMEMEN 2 | ||
1006 | #define USBMSRMCFG_EBMEN 3 | ||
1007 | #define USBMSRMCFG_DMEMEN 4 | ||
1008 | #define USBMSRMCFG_DBMEN 5 | ||
1009 | #define USBMSRMCFG_GMEMEN 6 | ||
1010 | #define USBMSRMCFG_OHCCLKEN 16 | ||
1011 | #define USBMSRMCFG_EHCCLKEN 17 | ||
1012 | #define USBMSRMCFG_UDCCLKEN 18 | ||
1013 | #define USBMSRMCFG_PHYPLLEN 19 | ||
1014 | #define USBMSRMCFG_RDCOMB 30 | ||
1015 | #define USBMSRMCFG_PFEN 31 | ||
1016 | |||
1017 | #endif /* CONFIG_SOC_AU1200 */ | ||
658 | 1018 | ||
659 | #define AU1000_LAST_INTC0_INT 31 | 1019 | #define AU1000_LAST_INTC0_INT 31 |
1020 | #define AU1000_LAST_INTC1_INT 63 | ||
660 | #define AU1000_MAX_INTR 63 | 1021 | #define AU1000_MAX_INTR 63 |
661 | 1022 | ||
662 | |||
663 | /* Programmable Counters 0 and 1 */ | 1023 | /* Programmable Counters 0 and 1 */ |
664 | #define SYS_BASE 0xB1900000 | 1024 | #define SYS_BASE 0xB1900000 |
665 | #define SYS_COUNTER_CNTRL (SYS_BASE + 0x14) | 1025 | #define SYS_COUNTER_CNTRL (SYS_BASE + 0x14) |
@@ -730,6 +1090,8 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; | |||
730 | #define I2S_CONTROL_D (1<<1) | 1090 | #define I2S_CONTROL_D (1<<1) |
731 | #define I2S_CONTROL_CE (1<<0) | 1091 | #define I2S_CONTROL_CE (1<<0) |
732 | 1092 | ||
1093 | #ifndef CONFIG_SOC_AU1200 | ||
1094 | |||
733 | /* USB Host Controller */ | 1095 | /* USB Host Controller */ |
734 | #define USB_OHCI_LEN 0x00100000 | 1096 | #define USB_OHCI_LEN 0x00100000 |
735 | 1097 | ||
@@ -775,6 +1137,8 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; | |||
775 | #define USBDEV_ENABLE (1<<1) | 1137 | #define USBDEV_ENABLE (1<<1) |
776 | #define USBDEV_CE (1<<0) | 1138 | #define USBDEV_CE (1<<0) |
777 | 1139 | ||
1140 | #endif /* !CONFIG_SOC_AU1200 */ | ||
1141 | |||
778 | /* Ethernet Controllers */ | 1142 | /* Ethernet Controllers */ |
779 | 1143 | ||
780 | /* 4 byte offsets from AU1000_ETH_BASE */ | 1144 | /* 4 byte offsets from AU1000_ETH_BASE */ |
@@ -1173,6 +1537,37 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; | |||
1173 | #define SYS_PF_PSC1_S1 (1 << 1) | 1537 | #define SYS_PF_PSC1_S1 (1 << 1) |
1174 | #define SYS_PF_MUST_BE_SET ((1 << 5) | (1 << 2)) | 1538 | #define SYS_PF_MUST_BE_SET ((1 << 5) | (1 << 2)) |
1175 | 1539 | ||
1540 | /* Au1200 Only */ | ||
1541 | #ifdef CONFIG_SOC_AU1200 | ||
1542 | #define SYS_PINFUNC_DMA (1<<31) | ||
1543 | #define SYS_PINFUNC_S0A (1<<30) | ||
1544 | #define SYS_PINFUNC_S1A (1<<29) | ||
1545 | #define SYS_PINFUNC_LP0 (1<<28) | ||
1546 | #define SYS_PINFUNC_LP1 (1<<27) | ||
1547 | #define SYS_PINFUNC_LD16 (1<<26) | ||
1548 | #define SYS_PINFUNC_LD8 (1<<25) | ||
1549 | #define SYS_PINFUNC_LD1 (1<<24) | ||
1550 | #define SYS_PINFUNC_LD0 (1<<23) | ||
1551 | #define SYS_PINFUNC_P1A (3<<21) | ||
1552 | #define SYS_PINFUNC_P1B (1<<20) | ||
1553 | #define SYS_PINFUNC_FS3 (1<<19) | ||
1554 | #define SYS_PINFUNC_P0A (3<<17) | ||
1555 | #define SYS_PINFUNC_CS (1<<16) | ||
1556 | #define SYS_PINFUNC_CIM (1<<15) | ||
1557 | #define SYS_PINFUNC_P1C (1<<14) | ||
1558 | #define SYS_PINFUNC_U1T (1<<12) | ||
1559 | #define SYS_PINFUNC_U1R (1<<11) | ||
1560 | #define SYS_PINFUNC_EX1 (1<<10) | ||
1561 | #define SYS_PINFUNC_EX0 (1<<9) | ||
1562 | #define SYS_PINFUNC_U0R (1<<8) | ||
1563 | #define SYS_PINFUNC_MC (1<<7) | ||
1564 | #define SYS_PINFUNC_S0B (1<<6) | ||
1565 | #define SYS_PINFUNC_S0C (1<<5) | ||
1566 | #define SYS_PINFUNC_P0B (1<<4) | ||
1567 | #define SYS_PINFUNC_U0T (1<<3) | ||
1568 | #define SYS_PINFUNC_S1B (1<<2) | ||
1569 | #endif | ||
1570 | |||
1176 | #define SYS_TRIOUTRD 0xB1900100 | 1571 | #define SYS_TRIOUTRD 0xB1900100 |
1177 | #define SYS_TRIOUTCLR 0xB1900100 | 1572 | #define SYS_TRIOUTCLR 0xB1900100 |
1178 | #define SYS_OUTPUTRD 0xB1900108 | 1573 | #define SYS_OUTPUTRD 0xB1900108 |
@@ -1300,7 +1695,6 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; | |||
1300 | #define SD1_XMIT_FIFO 0xB0680000 | 1695 | #define SD1_XMIT_FIFO 0xB0680000 |
1301 | #define SD1_RECV_FIFO 0xB0680004 | 1696 | #define SD1_RECV_FIFO 0xB0680004 |
1302 | 1697 | ||
1303 | |||
1304 | #if defined (CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550) | 1698 | #if defined (CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550) |
1305 | /* Au1500 PCI Controller */ | 1699 | /* Au1500 PCI Controller */ |
1306 | #define Au1500_CFG_BASE 0xB4005000 // virtual, kseg0 addr | 1700 | #define Au1500_CFG_BASE 0xB4005000 // virtual, kseg0 addr |
@@ -1363,36 +1757,77 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; | |||
1363 | _ctl_; }) | 1757 | _ctl_; }) |
1364 | 1758 | ||
1365 | 1759 | ||
1366 | #else /* Au1000 and Au1100 */ | 1760 | #else /* Au1000 and Au1100 and Au1200 */ |
1367 | 1761 | ||
1368 | /* don't allow any legacy ports probing */ | 1762 | /* don't allow any legacy ports probing */ |
1369 | #define IOPORT_RESOURCE_START 0x10000000; | 1763 | #define IOPORT_RESOURCE_START 0x10000000 |
1370 | #define IOPORT_RESOURCE_END 0xffffffff | 1764 | #define IOPORT_RESOURCE_END 0xffffffff |
1371 | #define IOMEM_RESOURCE_START 0x10000000 | 1765 | #define IOMEM_RESOURCE_START 0x10000000 |
1372 | #define IOMEM_RESOURCE_END 0xffffffff | 1766 | #define IOMEM_RESOURCE_END 0xffffffff |
1373 | 1767 | ||
1374 | #ifdef CONFIG_MIPS_PB1000 | ||
1375 | #define PCI_IO_START 0x10000000 | ||
1376 | #define PCI_IO_END 0x1000ffff | ||
1377 | #define PCI_MEM_START 0x18000000 | ||
1378 | #define PCI_MEM_END 0x18ffffff | ||
1379 | #define PCI_FIRST_DEVFN 0 | ||
1380 | #define PCI_LAST_DEVFN 1 | ||
1381 | #else | ||
1382 | /* no PCI bus controller */ | ||
1383 | #define PCI_IO_START 0 | 1768 | #define PCI_IO_START 0 |
1384 | #define PCI_IO_END 0 | 1769 | #define PCI_IO_END 0 |
1385 | #define PCI_MEM_START 0 | 1770 | #define PCI_MEM_START 0 |
1386 | #define PCI_MEM_END 0 | 1771 | #define PCI_MEM_END 0 |
1387 | #define PCI_FIRST_DEVFN 0 | 1772 | #define PCI_FIRST_DEVFN 0 |
1388 | #define PCI_LAST_DEVFN 0 | 1773 | #define PCI_LAST_DEVFN 0 |
1389 | #endif | ||
1390 | 1774 | ||
1391 | #endif | 1775 | #endif |
1392 | 1776 | ||
1777 | #ifndef _LANGUAGE_ASSEMBLY | ||
1778 | typedef volatile struct | ||
1779 | { | ||
1780 | /* 0x0000 */ u32 toytrim; | ||
1781 | /* 0x0004 */ u32 toywrite; | ||
1782 | /* 0x0008 */ u32 toymatch0; | ||
1783 | /* 0x000C */ u32 toymatch1; | ||
1784 | /* 0x0010 */ u32 toymatch2; | ||
1785 | /* 0x0014 */ u32 cntrctrl; | ||
1786 | /* 0x0018 */ u32 scratch0; | ||
1787 | /* 0x001C */ u32 scratch1; | ||
1788 | /* 0x0020 */ u32 freqctrl0; | ||
1789 | /* 0x0024 */ u32 freqctrl1; | ||
1790 | /* 0x0028 */ u32 clksrc; | ||
1791 | /* 0x002C */ u32 pinfunc; | ||
1792 | /* 0x0030 */ u32 reserved0; | ||
1793 | /* 0x0034 */ u32 wakemsk; | ||
1794 | /* 0x0038 */ u32 endian; | ||
1795 | /* 0x003C */ u32 powerctrl; | ||
1796 | /* 0x0040 */ u32 toyread; | ||
1797 | /* 0x0044 */ u32 rtctrim; | ||
1798 | /* 0x0048 */ u32 rtcwrite; | ||
1799 | /* 0x004C */ u32 rtcmatch0; | ||
1800 | /* 0x0050 */ u32 rtcmatch1; | ||
1801 | /* 0x0054 */ u32 rtcmatch2; | ||
1802 | /* 0x0058 */ u32 rtcread; | ||
1803 | /* 0x005C */ u32 wakesrc; | ||
1804 | /* 0x0060 */ u32 cpupll; | ||
1805 | /* 0x0064 */ u32 auxpll; | ||
1806 | /* 0x0068 */ u32 reserved1; | ||
1807 | /* 0x006C */ u32 reserved2; | ||
1808 | /* 0x0070 */ u32 reserved3; | ||
1809 | /* 0x0074 */ u32 reserved4; | ||
1810 | /* 0x0078 */ u32 slppwr; | ||
1811 | /* 0x007C */ u32 sleep; | ||
1812 | /* 0x0080 */ u32 reserved5[32]; | ||
1813 | /* 0x0100 */ u32 trioutrd; | ||
1814 | #define trioutclr trioutrd | ||
1815 | /* 0x0104 */ u32 reserved6; | ||
1816 | /* 0x0108 */ u32 outputrd; | ||
1817 | #define outputset outputrd | ||
1818 | /* 0x010C */ u32 outputclr; | ||
1819 | /* 0x0110 */ u32 pinstaterd; | ||
1820 | #define pininputen pinstaterd | ||
1821 | |||
1822 | } AU1X00_SYS; | ||
1823 | |||
1824 | static AU1X00_SYS* const sys = (AU1X00_SYS *)SYS_BASE; | ||
1825 | |||
1826 | #endif | ||
1393 | /* Processor information base on prid. | 1827 | /* Processor information base on prid. |
1394 | * Copied from PowerPC. | 1828 | * Copied from PowerPC. |
1395 | */ | 1829 | */ |
1830 | #ifndef _LANGUAGE_ASSEMBLY | ||
1396 | struct cpu_spec { | 1831 | struct cpu_spec { |
1397 | /* CPU is matched via (PRID & prid_mask) == prid_value */ | 1832 | /* CPU is matched via (PRID & prid_mask) == prid_value */ |
1398 | unsigned int prid_mask; | 1833 | unsigned int prid_mask; |
@@ -1406,3 +1841,6 @@ struct cpu_spec { | |||
1406 | extern struct cpu_spec cpu_specs[]; | 1841 | extern struct cpu_spec cpu_specs[]; |
1407 | extern struct cpu_spec *cur_cpu_spec[]; | 1842 | extern struct cpu_spec *cur_cpu_spec[]; |
1408 | #endif | 1843 | #endif |
1844 | |||
1845 | #endif | ||
1846 | |||