diff options
Diffstat (limited to 'arch/mips/include/asm/mach-au1x00')
-rw-r--r-- | arch/mips/include/asm/mach-au1x00/au1000.h | 876 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-au1x00/au1100_mmc.h | 2 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h | 23 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-au1x00/au1xxx_eth.h | 17 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-au1x00/gpio-au1000.h | 164 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-au1x00/gpio.h | 2 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-au1x00/ioremap.h | 2 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-au1x00/prom.h | 1 |
8 files changed, 485 insertions, 602 deletions
diff --git a/arch/mips/include/asm/mach-au1x00/au1000.h b/arch/mips/include/asm/mach-au1x00/au1000.h index 854e95f1b07c..ae07423e6e82 100644 --- a/arch/mips/include/asm/mach-au1x00/au1000.h +++ b/arch/mips/include/asm/mach-au1x00/au1000.h | |||
@@ -130,6 +130,56 @@ static inline int au1xxx_cpu_needs_config_od(void) | |||
130 | return 0; | 130 | return 0; |
131 | } | 131 | } |
132 | 132 | ||
133 | #define ALCHEMY_CPU_UNKNOWN -1 | ||
134 | #define ALCHEMY_CPU_AU1000 0 | ||
135 | #define ALCHEMY_CPU_AU1500 1 | ||
136 | #define ALCHEMY_CPU_AU1100 2 | ||
137 | #define ALCHEMY_CPU_AU1550 3 | ||
138 | #define ALCHEMY_CPU_AU1200 4 | ||
139 | |||
140 | static inline int alchemy_get_cputype(void) | ||
141 | { | ||
142 | switch (read_c0_prid() & 0xffff0000) { | ||
143 | case 0x00030000: | ||
144 | return ALCHEMY_CPU_AU1000; | ||
145 | break; | ||
146 | case 0x01030000: | ||
147 | return ALCHEMY_CPU_AU1500; | ||
148 | break; | ||
149 | case 0x02030000: | ||
150 | return ALCHEMY_CPU_AU1100; | ||
151 | break; | ||
152 | case 0x03030000: | ||
153 | return ALCHEMY_CPU_AU1550; | ||
154 | break; | ||
155 | case 0x04030000: | ||
156 | case 0x05030000: | ||
157 | return ALCHEMY_CPU_AU1200; | ||
158 | break; | ||
159 | } | ||
160 | |||
161 | return ALCHEMY_CPU_UNKNOWN; | ||
162 | } | ||
163 | |||
164 | static inline void alchemy_uart_putchar(u32 uart_phys, u8 c) | ||
165 | { | ||
166 | void __iomem *base = (void __iomem *)KSEG1ADDR(uart_phys); | ||
167 | int timeout, i; | ||
168 | |||
169 | /* check LSR TX_EMPTY bit */ | ||
170 | timeout = 0xffffff; | ||
171 | do { | ||
172 | if (__raw_readl(base + 0x1c) & 0x20) | ||
173 | break; | ||
174 | /* slow down */ | ||
175 | for (i = 10000; i; i--) | ||
176 | asm volatile ("nop"); | ||
177 | } while (--timeout); | ||
178 | |||
179 | __raw_writel(c, base + 0x04); /* tx */ | ||
180 | wmb(); | ||
181 | } | ||
182 | |||
133 | /* arch/mips/au1000/common/clocks.c */ | 183 | /* arch/mips/au1000/common/clocks.c */ |
134 | extern void set_au1x00_speed(unsigned int new_freq); | 184 | extern void set_au1x00_speed(unsigned int new_freq); |
135 | extern unsigned int get_au1x00_speed(void); | 185 | extern unsigned int get_au1x00_speed(void); |
@@ -143,20 +193,332 @@ void au_sleep(void); | |||
143 | void save_au1xxx_intctl(void); | 193 | void save_au1xxx_intctl(void); |
144 | void restore_au1xxx_intctl(void); | 194 | void restore_au1xxx_intctl(void); |
145 | 195 | ||
146 | /* | 196 | |
147 | * Every board describes its IRQ mapping with this table. | 197 | /* SOC Interrupt numbers */ |
148 | */ | 198 | |
149 | struct au1xxx_irqmap { | 199 | #define AU1000_INTC0_INT_BASE (MIPS_CPU_IRQ_BASE + 8) |
150 | int im_irq; | 200 | #define AU1000_INTC0_INT_LAST (AU1000_INTC0_INT_BASE + 31) |
151 | int im_type; | 201 | #define AU1000_INTC1_INT_BASE (AU1000_INTC0_INT_LAST + 1) |
152 | int im_request; | 202 | #define AU1000_INTC1_INT_LAST (AU1000_INTC1_INT_BASE + 31) |
203 | #define AU1000_MAX_INTR AU1000_INTC1_INT_LAST | ||
204 | |||
205 | enum soc_au1000_ints { | ||
206 | AU1000_FIRST_INT = AU1000_INTC0_INT_BASE, | ||
207 | AU1000_UART0_INT = AU1000_FIRST_INT, | ||
208 | AU1000_UART1_INT, | ||
209 | AU1000_UART2_INT, | ||
210 | AU1000_UART3_INT, | ||
211 | AU1000_SSI0_INT, | ||
212 | AU1000_SSI1_INT, | ||
213 | AU1000_DMA_INT_BASE, | ||
214 | |||
215 | AU1000_TOY_INT = AU1000_FIRST_INT + 14, | ||
216 | AU1000_TOY_MATCH0_INT, | ||
217 | AU1000_TOY_MATCH1_INT, | ||
218 | AU1000_TOY_MATCH2_INT, | ||
219 | AU1000_RTC_INT, | ||
220 | AU1000_RTC_MATCH0_INT, | ||
221 | AU1000_RTC_MATCH1_INT, | ||
222 | AU1000_RTC_MATCH2_INT, | ||
223 | AU1000_IRDA_TX_INT, | ||
224 | AU1000_IRDA_RX_INT, | ||
225 | AU1000_USB_DEV_REQ_INT, | ||
226 | AU1000_USB_DEV_SUS_INT, | ||
227 | AU1000_USB_HOST_INT, | ||
228 | AU1000_ACSYNC_INT, | ||
229 | AU1000_MAC0_DMA_INT, | ||
230 | AU1000_MAC1_DMA_INT, | ||
231 | AU1000_I2S_UO_INT, | ||
232 | AU1000_AC97C_INT, | ||
233 | AU1000_GPIO0_INT, | ||
234 | AU1000_GPIO1_INT, | ||
235 | AU1000_GPIO2_INT, | ||
236 | AU1000_GPIO3_INT, | ||
237 | AU1000_GPIO4_INT, | ||
238 | AU1000_GPIO5_INT, | ||
239 | AU1000_GPIO6_INT, | ||
240 | AU1000_GPIO7_INT, | ||
241 | AU1000_GPIO8_INT, | ||
242 | AU1000_GPIO9_INT, | ||
243 | AU1000_GPIO10_INT, | ||
244 | AU1000_GPIO11_INT, | ||
245 | AU1000_GPIO12_INT, | ||
246 | AU1000_GPIO13_INT, | ||
247 | AU1000_GPIO14_INT, | ||
248 | AU1000_GPIO15_INT, | ||
249 | AU1000_GPIO16_INT, | ||
250 | AU1000_GPIO17_INT, | ||
251 | AU1000_GPIO18_INT, | ||
252 | AU1000_GPIO19_INT, | ||
253 | AU1000_GPIO20_INT, | ||
254 | AU1000_GPIO21_INT, | ||
255 | AU1000_GPIO22_INT, | ||
256 | AU1000_GPIO23_INT, | ||
257 | AU1000_GPIO24_INT, | ||
258 | AU1000_GPIO25_INT, | ||
259 | AU1000_GPIO26_INT, | ||
260 | AU1000_GPIO27_INT, | ||
261 | AU1000_GPIO28_INT, | ||
262 | AU1000_GPIO29_INT, | ||
263 | AU1000_GPIO30_INT, | ||
264 | AU1000_GPIO31_INT, | ||
153 | }; | 265 | }; |
154 | 266 | ||
155 | /* core calls this function to let boards initialize other IRQ sources */ | 267 | enum soc_au1100_ints { |
156 | void board_init_irq(void); | 268 | AU1100_FIRST_INT = AU1000_INTC0_INT_BASE, |
269 | AU1100_UART0_INT = AU1100_FIRST_INT, | ||
270 | AU1100_UART1_INT, | ||
271 | AU1100_SD_INT, | ||
272 | AU1100_UART3_INT, | ||
273 | AU1100_SSI0_INT, | ||
274 | AU1100_SSI1_INT, | ||
275 | AU1100_DMA_INT_BASE, | ||
276 | |||
277 | AU1100_TOY_INT = AU1100_FIRST_INT + 14, | ||
278 | AU1100_TOY_MATCH0_INT, | ||
279 | AU1100_TOY_MATCH1_INT, | ||
280 | AU1100_TOY_MATCH2_INT, | ||
281 | AU1100_RTC_INT, | ||
282 | AU1100_RTC_MATCH0_INT, | ||
283 | AU1100_RTC_MATCH1_INT, | ||
284 | AU1100_RTC_MATCH2_INT, | ||
285 | AU1100_IRDA_TX_INT, | ||
286 | AU1100_IRDA_RX_INT, | ||
287 | AU1100_USB_DEV_REQ_INT, | ||
288 | AU1100_USB_DEV_SUS_INT, | ||
289 | AU1100_USB_HOST_INT, | ||
290 | AU1100_ACSYNC_INT, | ||
291 | AU1100_MAC0_DMA_INT, | ||
292 | AU1100_GPIO208_215_INT, | ||
293 | AU1100_LCD_INT, | ||
294 | AU1100_AC97C_INT, | ||
295 | AU1100_GPIO0_INT, | ||
296 | AU1100_GPIO1_INT, | ||
297 | AU1100_GPIO2_INT, | ||
298 | AU1100_GPIO3_INT, | ||
299 | AU1100_GPIO4_INT, | ||
300 | AU1100_GPIO5_INT, | ||
301 | AU1100_GPIO6_INT, | ||
302 | AU1100_GPIO7_INT, | ||
303 | AU1100_GPIO8_INT, | ||
304 | AU1100_GPIO9_INT, | ||
305 | AU1100_GPIO10_INT, | ||
306 | AU1100_GPIO11_INT, | ||
307 | AU1100_GPIO12_INT, | ||
308 | AU1100_GPIO13_INT, | ||
309 | AU1100_GPIO14_INT, | ||
310 | AU1100_GPIO15_INT, | ||
311 | AU1100_GPIO16_INT, | ||
312 | AU1100_GPIO17_INT, | ||
313 | AU1100_GPIO18_INT, | ||
314 | AU1100_GPIO19_INT, | ||
315 | AU1100_GPIO20_INT, | ||
316 | AU1100_GPIO21_INT, | ||
317 | AU1100_GPIO22_INT, | ||
318 | AU1100_GPIO23_INT, | ||
319 | AU1100_GPIO24_INT, | ||
320 | AU1100_GPIO25_INT, | ||
321 | AU1100_GPIO26_INT, | ||
322 | AU1100_GPIO27_INT, | ||
323 | AU1100_GPIO28_INT, | ||
324 | AU1100_GPIO29_INT, | ||
325 | AU1100_GPIO30_INT, | ||
326 | AU1100_GPIO31_INT, | ||
327 | }; | ||
157 | 328 | ||
158 | /* boards call this to register additional (GPIO) interrupts */ | 329 | enum soc_au1500_ints { |
159 | void au1xxx_setup_irqmap(struct au1xxx_irqmap *map, int count); | 330 | AU1500_FIRST_INT = AU1000_INTC0_INT_BASE, |
331 | AU1500_UART0_INT = AU1500_FIRST_INT, | ||
332 | AU1500_PCI_INTA, | ||
333 | AU1500_PCI_INTB, | ||
334 | AU1500_UART3_INT, | ||
335 | AU1500_PCI_INTC, | ||
336 | AU1500_PCI_INTD, | ||
337 | AU1500_DMA_INT_BASE, | ||
338 | |||
339 | AU1500_TOY_INT = AU1500_FIRST_INT + 14, | ||
340 | AU1500_TOY_MATCH0_INT, | ||
341 | AU1500_TOY_MATCH1_INT, | ||
342 | AU1500_TOY_MATCH2_INT, | ||
343 | AU1500_RTC_INT, | ||
344 | AU1500_RTC_MATCH0_INT, | ||
345 | AU1500_RTC_MATCH1_INT, | ||
346 | AU1500_RTC_MATCH2_INT, | ||
347 | AU1500_PCI_ERR_INT, | ||
348 | AU1500_RESERVED_INT, | ||
349 | AU1500_USB_DEV_REQ_INT, | ||
350 | AU1500_USB_DEV_SUS_INT, | ||
351 | AU1500_USB_HOST_INT, | ||
352 | AU1500_ACSYNC_INT, | ||
353 | AU1500_MAC0_DMA_INT, | ||
354 | AU1500_MAC1_DMA_INT, | ||
355 | AU1500_AC97C_INT = AU1500_FIRST_INT + 31, | ||
356 | AU1500_GPIO0_INT, | ||
357 | AU1500_GPIO1_INT, | ||
358 | AU1500_GPIO2_INT, | ||
359 | AU1500_GPIO3_INT, | ||
360 | AU1500_GPIO4_INT, | ||
361 | AU1500_GPIO5_INT, | ||
362 | AU1500_GPIO6_INT, | ||
363 | AU1500_GPIO7_INT, | ||
364 | AU1500_GPIO8_INT, | ||
365 | AU1500_GPIO9_INT, | ||
366 | AU1500_GPIO10_INT, | ||
367 | AU1500_GPIO11_INT, | ||
368 | AU1500_GPIO12_INT, | ||
369 | AU1500_GPIO13_INT, | ||
370 | AU1500_GPIO14_INT, | ||
371 | AU1500_GPIO15_INT, | ||
372 | AU1500_GPIO200_INT, | ||
373 | AU1500_GPIO201_INT, | ||
374 | AU1500_GPIO202_INT, | ||
375 | AU1500_GPIO203_INT, | ||
376 | AU1500_GPIO20_INT, | ||
377 | AU1500_GPIO204_INT, | ||
378 | AU1500_GPIO205_INT, | ||
379 | AU1500_GPIO23_INT, | ||
380 | AU1500_GPIO24_INT, | ||
381 | AU1500_GPIO25_INT, | ||
382 | AU1500_GPIO26_INT, | ||
383 | AU1500_GPIO27_INT, | ||
384 | AU1500_GPIO28_INT, | ||
385 | AU1500_GPIO206_INT, | ||
386 | AU1500_GPIO207_INT, | ||
387 | AU1500_GPIO208_215_INT, | ||
388 | }; | ||
389 | |||
390 | enum soc_au1550_ints { | ||
391 | AU1550_FIRST_INT = AU1000_INTC0_INT_BASE, | ||
392 | AU1550_UART0_INT = AU1550_FIRST_INT, | ||
393 | AU1550_PCI_INTA, | ||
394 | AU1550_PCI_INTB, | ||
395 | AU1550_DDMA_INT, | ||
396 | AU1550_CRYPTO_INT, | ||
397 | AU1550_PCI_INTC, | ||
398 | AU1550_PCI_INTD, | ||
399 | AU1550_PCI_RST_INT, | ||
400 | AU1550_UART1_INT, | ||
401 | AU1550_UART3_INT, | ||
402 | AU1550_PSC0_INT, | ||
403 | AU1550_PSC1_INT, | ||
404 | AU1550_PSC2_INT, | ||
405 | AU1550_PSC3_INT, | ||
406 | AU1550_TOY_INT, | ||
407 | AU1550_TOY_MATCH0_INT, | ||
408 | AU1550_TOY_MATCH1_INT, | ||
409 | AU1550_TOY_MATCH2_INT, | ||
410 | AU1550_RTC_INT, | ||
411 | AU1550_RTC_MATCH0_INT, | ||
412 | AU1550_RTC_MATCH1_INT, | ||
413 | AU1550_RTC_MATCH2_INT, | ||
414 | |||
415 | AU1550_NAND_INT = AU1550_FIRST_INT + 23, | ||
416 | AU1550_USB_DEV_REQ_INT, | ||
417 | AU1550_USB_DEV_SUS_INT, | ||
418 | AU1550_USB_HOST_INT, | ||
419 | AU1550_MAC0_DMA_INT, | ||
420 | AU1550_MAC1_DMA_INT, | ||
421 | AU1550_GPIO0_INT = AU1550_FIRST_INT + 32, | ||
422 | AU1550_GPIO1_INT, | ||
423 | AU1550_GPIO2_INT, | ||
424 | AU1550_GPIO3_INT, | ||
425 | AU1550_GPIO4_INT, | ||
426 | AU1550_GPIO5_INT, | ||
427 | AU1550_GPIO6_INT, | ||
428 | AU1550_GPIO7_INT, | ||
429 | AU1550_GPIO8_INT, | ||
430 | AU1550_GPIO9_INT, | ||
431 | AU1550_GPIO10_INT, | ||
432 | AU1550_GPIO11_INT, | ||
433 | AU1550_GPIO12_INT, | ||
434 | AU1550_GPIO13_INT, | ||
435 | AU1550_GPIO14_INT, | ||
436 | AU1550_GPIO15_INT, | ||
437 | AU1550_GPIO200_INT, | ||
438 | AU1550_GPIO201_205_INT, /* Logical or of GPIO201:205 */ | ||
439 | AU1550_GPIO16_INT, | ||
440 | AU1550_GPIO17_INT, | ||
441 | AU1550_GPIO20_INT, | ||
442 | AU1550_GPIO21_INT, | ||
443 | AU1550_GPIO22_INT, | ||
444 | AU1550_GPIO23_INT, | ||
445 | AU1550_GPIO24_INT, | ||
446 | AU1550_GPIO25_INT, | ||
447 | AU1550_GPIO26_INT, | ||
448 | AU1550_GPIO27_INT, | ||
449 | AU1550_GPIO28_INT, | ||
450 | AU1550_GPIO206_INT, | ||
451 | AU1550_GPIO207_INT, | ||
452 | AU1550_GPIO208_215_INT, /* Logical or of GPIO208:215 */ | ||
453 | }; | ||
454 | |||
455 | enum soc_au1200_ints { | ||
456 | AU1200_FIRST_INT = AU1000_INTC0_INT_BASE, | ||
457 | AU1200_UART0_INT = AU1200_FIRST_INT, | ||
458 | AU1200_SWT_INT, | ||
459 | AU1200_SD_INT, | ||
460 | AU1200_DDMA_INT, | ||
461 | AU1200_MAE_BE_INT, | ||
462 | AU1200_GPIO200_INT, | ||
463 | AU1200_GPIO201_INT, | ||
464 | AU1200_GPIO202_INT, | ||
465 | AU1200_UART1_INT, | ||
466 | AU1200_MAE_FE_INT, | ||
467 | AU1200_PSC0_INT, | ||
468 | AU1200_PSC1_INT, | ||
469 | AU1200_AES_INT, | ||
470 | AU1200_CAMERA_INT, | ||
471 | AU1200_TOY_INT, | ||
472 | AU1200_TOY_MATCH0_INT, | ||
473 | AU1200_TOY_MATCH1_INT, | ||
474 | AU1200_TOY_MATCH2_INT, | ||
475 | AU1200_RTC_INT, | ||
476 | AU1200_RTC_MATCH0_INT, | ||
477 | AU1200_RTC_MATCH1_INT, | ||
478 | AU1200_RTC_MATCH2_INT, | ||
479 | AU1200_GPIO203_INT, | ||
480 | AU1200_NAND_INT, | ||
481 | AU1200_GPIO204_INT, | ||
482 | AU1200_GPIO205_INT, | ||
483 | AU1200_GPIO206_INT, | ||
484 | AU1200_GPIO207_INT, | ||
485 | AU1200_GPIO208_215_INT, /* Logical OR of 208:215 */ | ||
486 | AU1200_USB_INT, | ||
487 | AU1200_LCD_INT, | ||
488 | AU1200_MAE_BOTH_INT, | ||
489 | AU1200_GPIO0_INT, | ||
490 | AU1200_GPIO1_INT, | ||
491 | AU1200_GPIO2_INT, | ||
492 | AU1200_GPIO3_INT, | ||
493 | AU1200_GPIO4_INT, | ||
494 | AU1200_GPIO5_INT, | ||
495 | AU1200_GPIO6_INT, | ||
496 | AU1200_GPIO7_INT, | ||
497 | AU1200_GPIO8_INT, | ||
498 | AU1200_GPIO9_INT, | ||
499 | AU1200_GPIO10_INT, | ||
500 | AU1200_GPIO11_INT, | ||
501 | AU1200_GPIO12_INT, | ||
502 | AU1200_GPIO13_INT, | ||
503 | AU1200_GPIO14_INT, | ||
504 | AU1200_GPIO15_INT, | ||
505 | AU1200_GPIO16_INT, | ||
506 | AU1200_GPIO17_INT, | ||
507 | AU1200_GPIO18_INT, | ||
508 | AU1200_GPIO19_INT, | ||
509 | AU1200_GPIO20_INT, | ||
510 | AU1200_GPIO21_INT, | ||
511 | AU1200_GPIO22_INT, | ||
512 | AU1200_GPIO23_INT, | ||
513 | AU1200_GPIO24_INT, | ||
514 | AU1200_GPIO25_INT, | ||
515 | AU1200_GPIO26_INT, | ||
516 | AU1200_GPIO27_INT, | ||
517 | AU1200_GPIO28_INT, | ||
518 | AU1200_GPIO29_INT, | ||
519 | AU1200_GPIO30_INT, | ||
520 | AU1200_GPIO31_INT, | ||
521 | }; | ||
160 | 522 | ||
161 | #endif /* !defined (_LANGUAGE_ASSEMBLY) */ | 523 | #endif /* !defined (_LANGUAGE_ASSEMBLY) */ |
162 | 524 | ||
@@ -549,78 +911,16 @@ void au1xxx_setup_irqmap(struct au1xxx_irqmap *map, int count); | |||
549 | 911 | ||
550 | #define IC1_TESTBIT 0xB1800080 | 912 | #define IC1_TESTBIT 0xB1800080 |
551 | 913 | ||
552 | /* Interrupt Numbers */ | 914 | |
553 | /* Au1000 */ | 915 | /* Au1000 */ |
554 | #ifdef CONFIG_SOC_AU1000 | 916 | #ifdef CONFIG_SOC_AU1000 |
555 | enum soc_au1000_ints { | ||
556 | AU1000_FIRST_INT = MIPS_CPU_IRQ_BASE + 8, | ||
557 | AU1000_UART0_INT = AU1000_FIRST_INT, | ||
558 | AU1000_UART1_INT, /* au1000 */ | ||
559 | AU1000_UART2_INT, /* au1000 */ | ||
560 | AU1000_UART3_INT, | ||
561 | AU1000_SSI0_INT, /* au1000 */ | ||
562 | AU1000_SSI1_INT, /* au1000 */ | ||
563 | AU1000_DMA_INT_BASE, | ||
564 | |||
565 | AU1000_TOY_INT = AU1000_FIRST_INT + 14, | ||
566 | AU1000_TOY_MATCH0_INT, | ||
567 | AU1000_TOY_MATCH1_INT, | ||
568 | AU1000_TOY_MATCH2_INT, | ||
569 | AU1000_RTC_INT, | ||
570 | AU1000_RTC_MATCH0_INT, | ||
571 | AU1000_RTC_MATCH1_INT, | ||
572 | AU1000_RTC_MATCH2_INT, | ||
573 | AU1000_IRDA_TX_INT, /* au1000 */ | ||
574 | AU1000_IRDA_RX_INT, /* au1000 */ | ||
575 | AU1000_USB_DEV_REQ_INT, | ||
576 | AU1000_USB_DEV_SUS_INT, | ||
577 | AU1000_USB_HOST_INT, | ||
578 | AU1000_ACSYNC_INT, | ||
579 | AU1000_MAC0_DMA_INT, | ||
580 | AU1000_MAC1_DMA_INT, | ||
581 | AU1000_I2S_UO_INT, /* au1000 */ | ||
582 | AU1000_AC97C_INT, | ||
583 | AU1000_GPIO_0, | ||
584 | AU1000_GPIO_1, | ||
585 | AU1000_GPIO_2, | ||
586 | AU1000_GPIO_3, | ||
587 | AU1000_GPIO_4, | ||
588 | AU1000_GPIO_5, | ||
589 | AU1000_GPIO_6, | ||
590 | AU1000_GPIO_7, | ||
591 | AU1000_GPIO_8, | ||
592 | AU1000_GPIO_9, | ||
593 | AU1000_GPIO_10, | ||
594 | AU1000_GPIO_11, | ||
595 | AU1000_GPIO_12, | ||
596 | AU1000_GPIO_13, | ||
597 | AU1000_GPIO_14, | ||
598 | AU1000_GPIO_15, | ||
599 | AU1000_GPIO_16, | ||
600 | AU1000_GPIO_17, | ||
601 | AU1000_GPIO_18, | ||
602 | AU1000_GPIO_19, | ||
603 | AU1000_GPIO_20, | ||
604 | AU1000_GPIO_21, | ||
605 | AU1000_GPIO_22, | ||
606 | AU1000_GPIO_23, | ||
607 | AU1000_GPIO_24, | ||
608 | AU1000_GPIO_25, | ||
609 | AU1000_GPIO_26, | ||
610 | AU1000_GPIO_27, | ||
611 | AU1000_GPIO_28, | ||
612 | AU1000_GPIO_29, | ||
613 | AU1000_GPIO_30, | ||
614 | AU1000_GPIO_31, | ||
615 | }; | ||
616 | 917 | ||
617 | #define UART0_ADDR 0xB1100000 | 918 | #define UART0_ADDR 0xB1100000 |
618 | #define UART1_ADDR 0xB1200000 | ||
619 | #define UART2_ADDR 0xB1300000 | ||
620 | #define UART3_ADDR 0xB1400000 | 919 | #define UART3_ADDR 0xB1400000 |
621 | 920 | ||
622 | #define USB_OHCI_BASE 0x10100000 /* phys addr for ioremap */ | 921 | #define USB_OHCI_BASE 0x10100000 /* phys addr for ioremap */ |
623 | #define USB_HOST_CONFIG 0xB017FFFC | 922 | #define USB_HOST_CONFIG 0xB017FFFC |
923 | #define FOR_PLATFORM_C_USB_HOST_INT AU1000_USB_HOST_INT | ||
624 | 924 | ||
625 | #define AU1000_ETH0_BASE 0xB0500000 | 925 | #define AU1000_ETH0_BASE 0xB0500000 |
626 | #define AU1000_ETH1_BASE 0xB0510000 | 926 | #define AU1000_ETH1_BASE 0xB0510000 |
@@ -631,78 +931,13 @@ enum soc_au1000_ints { | |||
631 | 931 | ||
632 | /* Au1500 */ | 932 | /* Au1500 */ |
633 | #ifdef CONFIG_SOC_AU1500 | 933 | #ifdef CONFIG_SOC_AU1500 |
634 | enum soc_au1500_ints { | ||
635 | AU1500_FIRST_INT = MIPS_CPU_IRQ_BASE + 8, | ||
636 | AU1500_UART0_INT = AU1500_FIRST_INT, | ||
637 | AU1000_PCI_INTA, /* au1500 */ | ||
638 | AU1000_PCI_INTB, /* au1500 */ | ||
639 | AU1500_UART3_INT, | ||
640 | AU1000_PCI_INTC, /* au1500 */ | ||
641 | AU1000_PCI_INTD, /* au1500 */ | ||
642 | AU1000_DMA_INT_BASE, | ||
643 | |||
644 | AU1000_TOY_INT = AU1500_FIRST_INT + 14, | ||
645 | AU1000_TOY_MATCH0_INT, | ||
646 | AU1000_TOY_MATCH1_INT, | ||
647 | AU1000_TOY_MATCH2_INT, | ||
648 | AU1000_RTC_INT, | ||
649 | AU1000_RTC_MATCH0_INT, | ||
650 | AU1000_RTC_MATCH1_INT, | ||
651 | AU1000_RTC_MATCH2_INT, | ||
652 | AU1500_PCI_ERR_INT, | ||
653 | AU1500_RESERVED_INT, | ||
654 | AU1000_USB_DEV_REQ_INT, | ||
655 | AU1000_USB_DEV_SUS_INT, | ||
656 | AU1000_USB_HOST_INT, | ||
657 | AU1000_ACSYNC_INT, | ||
658 | AU1500_MAC0_DMA_INT, | ||
659 | AU1500_MAC1_DMA_INT, | ||
660 | AU1000_AC97C_INT = AU1500_FIRST_INT + 31, | ||
661 | AU1000_GPIO_0, | ||
662 | AU1000_GPIO_1, | ||
663 | AU1000_GPIO_2, | ||
664 | AU1000_GPIO_3, | ||
665 | AU1000_GPIO_4, | ||
666 | AU1000_GPIO_5, | ||
667 | AU1000_GPIO_6, | ||
668 | AU1000_GPIO_7, | ||
669 | AU1000_GPIO_8, | ||
670 | AU1000_GPIO_9, | ||
671 | AU1000_GPIO_10, | ||
672 | AU1000_GPIO_11, | ||
673 | AU1000_GPIO_12, | ||
674 | AU1000_GPIO_13, | ||
675 | AU1000_GPIO_14, | ||
676 | AU1000_GPIO_15, | ||
677 | AU1500_GPIO_200, | ||
678 | AU1500_GPIO_201, | ||
679 | AU1500_GPIO_202, | ||
680 | AU1500_GPIO_203, | ||
681 | AU1500_GPIO_20, | ||
682 | AU1500_GPIO_204, | ||
683 | AU1500_GPIO_205, | ||
684 | AU1500_GPIO_23, | ||
685 | AU1500_GPIO_24, | ||
686 | AU1500_GPIO_25, | ||
687 | AU1500_GPIO_26, | ||
688 | AU1500_GPIO_27, | ||
689 | AU1500_GPIO_28, | ||
690 | AU1500_GPIO_206, | ||
691 | AU1500_GPIO_207, | ||
692 | AU1500_GPIO_208_215, | ||
693 | }; | ||
694 | |||
695 | /* shortcuts */ | ||
696 | #define INTA AU1000_PCI_INTA | ||
697 | #define INTB AU1000_PCI_INTB | ||
698 | #define INTC AU1000_PCI_INTC | ||
699 | #define INTD AU1000_PCI_INTD | ||
700 | 934 | ||
701 | #define UART0_ADDR 0xB1100000 | 935 | #define UART0_ADDR 0xB1100000 |
702 | #define UART3_ADDR 0xB1400000 | 936 | #define UART3_ADDR 0xB1400000 |
703 | 937 | ||
704 | #define USB_OHCI_BASE 0x10100000 /* phys addr for ioremap */ | 938 | #define USB_OHCI_BASE 0x10100000 /* phys addr for ioremap */ |
705 | #define USB_HOST_CONFIG 0xB017fffc | 939 | #define USB_HOST_CONFIG 0xB017fffc |
940 | #define FOR_PLATFORM_C_USB_HOST_INT AU1500_USB_HOST_INT | ||
706 | 941 | ||
707 | #define AU1500_ETH0_BASE 0xB1500000 | 942 | #define AU1500_ETH0_BASE 0xB1500000 |
708 | #define AU1500_ETH1_BASE 0xB1510000 | 943 | #define AU1500_ETH1_BASE 0xB1510000 |
@@ -713,74 +948,13 @@ enum soc_au1500_ints { | |||
713 | 948 | ||
714 | /* Au1100 */ | 949 | /* Au1100 */ |
715 | #ifdef CONFIG_SOC_AU1100 | 950 | #ifdef CONFIG_SOC_AU1100 |
716 | enum soc_au1100_ints { | ||
717 | AU1100_FIRST_INT = MIPS_CPU_IRQ_BASE + 8, | ||
718 | AU1100_UART0_INT = AU1100_FIRST_INT, | ||
719 | AU1100_UART1_INT, | ||
720 | AU1100_SD_INT, | ||
721 | AU1100_UART3_INT, | ||
722 | AU1000_SSI0_INT, | ||
723 | AU1000_SSI1_INT, | ||
724 | AU1000_DMA_INT_BASE, | ||
725 | |||
726 | AU1000_TOY_INT = AU1100_FIRST_INT + 14, | ||
727 | AU1000_TOY_MATCH0_INT, | ||
728 | AU1000_TOY_MATCH1_INT, | ||
729 | AU1000_TOY_MATCH2_INT, | ||
730 | AU1000_RTC_INT, | ||
731 | AU1000_RTC_MATCH0_INT, | ||
732 | AU1000_RTC_MATCH1_INT, | ||
733 | AU1000_RTC_MATCH2_INT, | ||
734 | AU1000_IRDA_TX_INT, | ||
735 | AU1000_IRDA_RX_INT, | ||
736 | AU1000_USB_DEV_REQ_INT, | ||
737 | AU1000_USB_DEV_SUS_INT, | ||
738 | AU1000_USB_HOST_INT, | ||
739 | AU1000_ACSYNC_INT, | ||
740 | AU1100_MAC0_DMA_INT, | ||
741 | AU1100_GPIO_208_215, | ||
742 | AU1100_LCD_INT, | ||
743 | AU1000_AC97C_INT, | ||
744 | AU1000_GPIO_0, | ||
745 | AU1000_GPIO_1, | ||
746 | AU1000_GPIO_2, | ||
747 | AU1000_GPIO_3, | ||
748 | AU1000_GPIO_4, | ||
749 | AU1000_GPIO_5, | ||
750 | AU1000_GPIO_6, | ||
751 | AU1000_GPIO_7, | ||
752 | AU1000_GPIO_8, | ||
753 | AU1000_GPIO_9, | ||
754 | AU1000_GPIO_10, | ||
755 | AU1000_GPIO_11, | ||
756 | AU1000_GPIO_12, | ||
757 | AU1000_GPIO_13, | ||
758 | AU1000_GPIO_14, | ||
759 | AU1000_GPIO_15, | ||
760 | AU1000_GPIO_16, | ||
761 | AU1000_GPIO_17, | ||
762 | AU1000_GPIO_18, | ||
763 | AU1000_GPIO_19, | ||
764 | AU1000_GPIO_20, | ||
765 | AU1000_GPIO_21, | ||
766 | AU1000_GPIO_22, | ||
767 | AU1000_GPIO_23, | ||
768 | AU1000_GPIO_24, | ||
769 | AU1000_GPIO_25, | ||
770 | AU1000_GPIO_26, | ||
771 | AU1000_GPIO_27, | ||
772 | AU1000_GPIO_28, | ||
773 | AU1000_GPIO_29, | ||
774 | AU1000_GPIO_30, | ||
775 | AU1000_GPIO_31, | ||
776 | }; | ||
777 | 951 | ||
778 | #define UART0_ADDR 0xB1100000 | 952 | #define UART0_ADDR 0xB1100000 |
779 | #define UART1_ADDR 0xB1200000 | ||
780 | #define UART3_ADDR 0xB1400000 | 953 | #define UART3_ADDR 0xB1400000 |
781 | 954 | ||
782 | #define USB_OHCI_BASE 0x10100000 /* phys addr for ioremap */ | 955 | #define USB_OHCI_BASE 0x10100000 /* phys addr for ioremap */ |
783 | #define USB_HOST_CONFIG 0xB017FFFC | 956 | #define USB_HOST_CONFIG 0xB017FFFC |
957 | #define FOR_PLATFORM_C_USB_HOST_INT AU1100_USB_HOST_INT | ||
784 | 958 | ||
785 | #define AU1100_ETH0_BASE 0xB0500000 | 959 | #define AU1100_ETH0_BASE 0xB0500000 |
786 | #define AU1100_MAC0_ENABLE 0xB0520000 | 960 | #define AU1100_MAC0_ENABLE 0xB0520000 |
@@ -788,87 +962,12 @@ enum soc_au1100_ints { | |||
788 | #endif /* CONFIG_SOC_AU1100 */ | 962 | #endif /* CONFIG_SOC_AU1100 */ |
789 | 963 | ||
790 | #ifdef CONFIG_SOC_AU1550 | 964 | #ifdef CONFIG_SOC_AU1550 |
791 | enum soc_au1550_ints { | ||
792 | AU1550_FIRST_INT = MIPS_CPU_IRQ_BASE + 8, | ||
793 | AU1550_UART0_INT = AU1550_FIRST_INT, | ||
794 | AU1550_PCI_INTA, | ||
795 | AU1550_PCI_INTB, | ||
796 | AU1550_DDMA_INT, | ||
797 | AU1550_CRYPTO_INT, | ||
798 | AU1550_PCI_INTC, | ||
799 | AU1550_PCI_INTD, | ||
800 | AU1550_PCI_RST_INT, | ||
801 | AU1550_UART1_INT, | ||
802 | AU1550_UART3_INT, | ||
803 | AU1550_PSC0_INT, | ||
804 | AU1550_PSC1_INT, | ||
805 | AU1550_PSC2_INT, | ||
806 | AU1550_PSC3_INT, | ||
807 | AU1000_TOY_INT, | ||
808 | AU1000_TOY_MATCH0_INT, | ||
809 | AU1000_TOY_MATCH1_INT, | ||
810 | AU1000_TOY_MATCH2_INT, | ||
811 | AU1000_RTC_INT, | ||
812 | AU1000_RTC_MATCH0_INT, | ||
813 | AU1000_RTC_MATCH1_INT, | ||
814 | AU1000_RTC_MATCH2_INT, | ||
815 | |||
816 | AU1550_NAND_INT = AU1550_FIRST_INT + 23, | ||
817 | AU1550_USB_DEV_REQ_INT, | ||
818 | AU1000_USB_DEV_REQ_INT = AU1550_USB_DEV_REQ_INT, | ||
819 | AU1550_USB_DEV_SUS_INT, | ||
820 | AU1000_USB_DEV_SUS_INT = AU1550_USB_DEV_SUS_INT, | ||
821 | AU1550_USB_HOST_INT, | ||
822 | AU1000_USB_HOST_INT = AU1550_USB_HOST_INT, | ||
823 | AU1550_MAC0_DMA_INT, | ||
824 | AU1550_MAC1_DMA_INT, | ||
825 | AU1000_GPIO_0 = AU1550_FIRST_INT + 32, | ||
826 | AU1000_GPIO_1, | ||
827 | AU1000_GPIO_2, | ||
828 | AU1000_GPIO_3, | ||
829 | AU1000_GPIO_4, | ||
830 | AU1000_GPIO_5, | ||
831 | AU1000_GPIO_6, | ||
832 | AU1000_GPIO_7, | ||
833 | AU1000_GPIO_8, | ||
834 | AU1000_GPIO_9, | ||
835 | AU1000_GPIO_10, | ||
836 | AU1000_GPIO_11, | ||
837 | AU1000_GPIO_12, | ||
838 | AU1000_GPIO_13, | ||
839 | AU1000_GPIO_14, | ||
840 | AU1000_GPIO_15, | ||
841 | AU1550_GPIO_200, | ||
842 | AU1500_GPIO_201_205, /* Logical or of GPIO201:205 */ | ||
843 | AU1500_GPIO_16, | ||
844 | AU1500_GPIO_17, | ||
845 | AU1500_GPIO_20, | ||
846 | AU1500_GPIO_21, | ||
847 | AU1500_GPIO_22, | ||
848 | AU1500_GPIO_23, | ||
849 | AU1500_GPIO_24, | ||
850 | AU1500_GPIO_25, | ||
851 | AU1500_GPIO_26, | ||
852 | AU1500_GPIO_27, | ||
853 | AU1500_GPIO_28, | ||
854 | AU1500_GPIO_206, | ||
855 | AU1500_GPIO_207, | ||
856 | AU1500_GPIO_208_218, /* Logical or of GPIO208:218 */ | ||
857 | }; | ||
858 | |||
859 | /* shortcuts */ | ||
860 | #define INTA AU1550_PCI_INTA | ||
861 | #define INTB AU1550_PCI_INTB | ||
862 | #define INTC AU1550_PCI_INTC | ||
863 | #define INTD AU1550_PCI_INTD | ||
864 | |||
865 | #define UART0_ADDR 0xB1100000 | 965 | #define UART0_ADDR 0xB1100000 |
866 | #define UART1_ADDR 0xB1200000 | ||
867 | #define UART3_ADDR 0xB1400000 | ||
868 | 966 | ||
869 | #define USB_OHCI_BASE 0x14020000 /* phys addr for ioremap */ | 967 | #define USB_OHCI_BASE 0x14020000 /* phys addr for ioremap */ |
870 | #define USB_OHCI_LEN 0x00060000 | 968 | #define USB_OHCI_LEN 0x00060000 |
871 | #define USB_HOST_CONFIG 0xB4027ffc | 969 | #define USB_HOST_CONFIG 0xB4027ffc |
970 | #define FOR_PLATFORM_C_USB_HOST_INT AU1550_USB_HOST_INT | ||
872 | 971 | ||
873 | #define AU1550_ETH0_BASE 0xB0500000 | 972 | #define AU1550_ETH0_BASE 0xB0500000 |
874 | #define AU1550_ETH1_BASE 0xB0510000 | 973 | #define AU1550_ETH1_BASE 0xB0510000 |
@@ -877,78 +976,10 @@ enum soc_au1550_ints { | |||
877 | #define NUM_ETH_INTERFACES 2 | 976 | #define NUM_ETH_INTERFACES 2 |
878 | #endif /* CONFIG_SOC_AU1550 */ | 977 | #endif /* CONFIG_SOC_AU1550 */ |
879 | 978 | ||
979 | |||
880 | #ifdef CONFIG_SOC_AU1200 | 980 | #ifdef CONFIG_SOC_AU1200 |
881 | enum soc_au1200_ints { | ||
882 | AU1200_FIRST_INT = MIPS_CPU_IRQ_BASE + 8, | ||
883 | AU1200_UART0_INT = AU1200_FIRST_INT, | ||
884 | AU1200_SWT_INT, | ||
885 | AU1200_SD_INT, | ||
886 | AU1200_DDMA_INT, | ||
887 | AU1200_MAE_BE_INT, | ||
888 | AU1200_GPIO_200, | ||
889 | AU1200_GPIO_201, | ||
890 | AU1200_GPIO_202, | ||
891 | AU1200_UART1_INT, | ||
892 | AU1200_MAE_FE_INT, | ||
893 | AU1200_PSC0_INT, | ||
894 | AU1200_PSC1_INT, | ||
895 | AU1200_AES_INT, | ||
896 | AU1200_CAMERA_INT, | ||
897 | AU1000_TOY_INT, | ||
898 | AU1000_TOY_MATCH0_INT, | ||
899 | AU1000_TOY_MATCH1_INT, | ||
900 | AU1000_TOY_MATCH2_INT, | ||
901 | AU1000_RTC_INT, | ||
902 | AU1000_RTC_MATCH0_INT, | ||
903 | AU1000_RTC_MATCH1_INT, | ||
904 | AU1000_RTC_MATCH2_INT, | ||
905 | AU1200_GPIO_203, | ||
906 | AU1200_NAND_INT, | ||
907 | AU1200_GPIO_204, | ||
908 | AU1200_GPIO_205, | ||
909 | AU1200_GPIO_206, | ||
910 | AU1200_GPIO_207, | ||
911 | AU1200_GPIO_208_215, /* Logical OR of 208:215 */ | ||
912 | AU1200_USB_INT, | ||
913 | AU1000_USB_HOST_INT = AU1200_USB_INT, | ||
914 | AU1200_LCD_INT, | ||
915 | AU1200_MAE_BOTH_INT, | ||
916 | AU1000_GPIO_0, | ||
917 | AU1000_GPIO_1, | ||
918 | AU1000_GPIO_2, | ||
919 | AU1000_GPIO_3, | ||
920 | AU1000_GPIO_4, | ||
921 | AU1000_GPIO_5, | ||
922 | AU1000_GPIO_6, | ||
923 | AU1000_GPIO_7, | ||
924 | AU1000_GPIO_8, | ||
925 | AU1000_GPIO_9, | ||
926 | AU1000_GPIO_10, | ||
927 | AU1000_GPIO_11, | ||
928 | AU1000_GPIO_12, | ||
929 | AU1000_GPIO_13, | ||
930 | AU1000_GPIO_14, | ||
931 | AU1000_GPIO_15, | ||
932 | AU1000_GPIO_16, | ||
933 | AU1000_GPIO_17, | ||
934 | AU1000_GPIO_18, | ||
935 | AU1000_GPIO_19, | ||
936 | AU1000_GPIO_20, | ||
937 | AU1000_GPIO_21, | ||
938 | AU1000_GPIO_22, | ||
939 | AU1000_GPIO_23, | ||
940 | AU1000_GPIO_24, | ||
941 | AU1000_GPIO_25, | ||
942 | AU1000_GPIO_26, | ||
943 | AU1000_GPIO_27, | ||
944 | AU1000_GPIO_28, | ||
945 | AU1000_GPIO_29, | ||
946 | AU1000_GPIO_30, | ||
947 | AU1000_GPIO_31, | ||
948 | }; | ||
949 | 981 | ||
950 | #define UART0_ADDR 0xB1100000 | 982 | #define UART0_ADDR 0xB1100000 |
951 | #define UART1_ADDR 0xB1200000 | ||
952 | 983 | ||
953 | #define USB_UOC_BASE 0x14020020 | 984 | #define USB_UOC_BASE 0x14020020 |
954 | #define USB_UOC_LEN 0x20 | 985 | #define USB_UOC_LEN 0x20 |
@@ -974,15 +1005,9 @@ enum soc_au1200_ints { | |||
974 | #define USBMSRMCFG_RDCOMB 30 | 1005 | #define USBMSRMCFG_RDCOMB 30 |
975 | #define USBMSRMCFG_PFEN 31 | 1006 | #define USBMSRMCFG_PFEN 31 |
976 | 1007 | ||
977 | #endif /* CONFIG_SOC_AU1200 */ | 1008 | #define FOR_PLATFORM_C_USB_HOST_INT AU1200_USB_INT |
978 | |||
979 | #define AU1000_INTC0_INT_BASE (MIPS_CPU_IRQ_BASE + 8) | ||
980 | #define AU1000_INTC0_INT_LAST (AU1000_INTC0_INT_BASE + 31) | ||
981 | #define AU1000_INTC1_INT_BASE (AU1000_INTC0_INT_BASE + 32) | ||
982 | #define AU1000_INTC1_INT_LAST (AU1000_INTC1_INT_BASE + 31) | ||
983 | 1009 | ||
984 | #define AU1000_MAX_INTR AU1000_INTC1_INT_LAST | 1010 | #endif /* CONFIG_SOC_AU1200 */ |
985 | #define INTX 0xFF /* not valid */ | ||
986 | 1011 | ||
987 | /* Programmable Counters 0 and 1 */ | 1012 | /* Programmable Counters 0 and 1 */ |
988 | #define SYS_BASE 0xB1900000 | 1013 | #define SYS_BASE 0xB1900000 |
@@ -1231,14 +1256,6 @@ enum soc_au1200_ints { | |||
1231 | #define MAC_RX_BUFF3_STATUS 0x30 | 1256 | #define MAC_RX_BUFF3_STATUS 0x30 |
1232 | #define MAC_RX_BUFF3_ADDR 0x34 | 1257 | #define MAC_RX_BUFF3_ADDR 0x34 |
1233 | 1258 | ||
1234 | /* UARTS 0-3 */ | ||
1235 | #define UART_BASE UART0_ADDR | ||
1236 | #ifdef CONFIG_SOC_AU1200 | ||
1237 | #define UART_DEBUG_BASE UART1_ADDR | ||
1238 | #else | ||
1239 | #define UART_DEBUG_BASE UART3_ADDR | ||
1240 | #endif | ||
1241 | |||
1242 | #define UART_RX 0 /* Receive buffer */ | 1259 | #define UART_RX 0 /* Receive buffer */ |
1243 | #define UART_TX 4 /* Transmit buffer */ | 1260 | #define UART_TX 4 /* Transmit buffer */ |
1244 | #define UART_IER 8 /* Interrupt Enable Register */ | 1261 | #define UART_IER 8 /* Interrupt Enable Register */ |
@@ -1251,84 +1268,6 @@ enum soc_au1200_ints { | |||
1251 | #define UART_CLK 0x28 /* Baud Rate Clock Divider */ | 1268 | #define UART_CLK 0x28 /* Baud Rate Clock Divider */ |
1252 | #define UART_MOD_CNTRL 0x100 /* Module Control */ | 1269 | #define UART_MOD_CNTRL 0x100 /* Module Control */ |
1253 | 1270 | ||
1254 | #define UART_FCR_ENABLE_FIFO 0x01 /* Enable the FIFO */ | ||
1255 | #define UART_FCR_CLEAR_RCVR 0x02 /* Clear the RCVR FIFO */ | ||
1256 | #define UART_FCR_CLEAR_XMIT 0x04 /* Clear the XMIT FIFO */ | ||
1257 | #define UART_FCR_DMA_SELECT 0x08 /* For DMA applications */ | ||
1258 | #define UART_FCR_TRIGGER_MASK 0xF0 /* Mask for the FIFO trigger range */ | ||
1259 | #define UART_FCR_R_TRIGGER_1 0x00 /* Mask for receive trigger set at 1 */ | ||
1260 | #define UART_FCR_R_TRIGGER_4 0x40 /* Mask for receive trigger set at 4 */ | ||
1261 | #define UART_FCR_R_TRIGGER_8 0x80 /* Mask for receive trigger set at 8 */ | ||
1262 | #define UART_FCR_R_TRIGGER_14 0xA0 /* Mask for receive trigger set at 14 */ | ||
1263 | #define UART_FCR_T_TRIGGER_0 0x00 /* Mask for transmit trigger set at 0 */ | ||
1264 | #define UART_FCR_T_TRIGGER_4 0x10 /* Mask for transmit trigger set at 4 */ | ||
1265 | #define UART_FCR_T_TRIGGER_8 0x20 /* Mask for transmit trigger set at 8 */ | ||
1266 | #define UART_FCR_T_TRIGGER_12 0x30 /* Mask for transmit trigger set at 12 */ | ||
1267 | |||
1268 | /* | ||
1269 | * These are the definitions for the Line Control Register | ||
1270 | */ | ||
1271 | #define UART_LCR_SBC 0x40 /* Set break control */ | ||
1272 | #define UART_LCR_SPAR 0x20 /* Stick parity (?) */ | ||
1273 | #define UART_LCR_EPAR 0x10 /* Even parity select */ | ||
1274 | #define UART_LCR_PARITY 0x08 /* Parity Enable */ | ||
1275 | #define UART_LCR_STOP 0x04 /* Stop bits: 0=1 stop bit, 1= 2 stop bits */ | ||
1276 | #define UART_LCR_WLEN5 0x00 /* Wordlength: 5 bits */ | ||
1277 | #define UART_LCR_WLEN6 0x01 /* Wordlength: 6 bits */ | ||
1278 | #define UART_LCR_WLEN7 0x02 /* Wordlength: 7 bits */ | ||
1279 | #define UART_LCR_WLEN8 0x03 /* Wordlength: 8 bits */ | ||
1280 | |||
1281 | /* | ||
1282 | * These are the definitions for the Line Status Register | ||
1283 | */ | ||
1284 | #define UART_LSR_TEMT 0x40 /* Transmitter empty */ | ||
1285 | #define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */ | ||
1286 | #define UART_LSR_BI 0x10 /* Break interrupt indicator */ | ||
1287 | #define UART_LSR_FE 0x08 /* Frame error indicator */ | ||
1288 | #define UART_LSR_PE 0x04 /* Parity error indicator */ | ||
1289 | #define UART_LSR_OE 0x02 /* Overrun error indicator */ | ||
1290 | #define UART_LSR_DR 0x01 /* Receiver data ready */ | ||
1291 | |||
1292 | /* | ||
1293 | * These are the definitions for the Interrupt Identification Register | ||
1294 | */ | ||
1295 | #define UART_IIR_NO_INT 0x01 /* No interrupts pending */ | ||
1296 | #define UART_IIR_ID 0x06 /* Mask for the interrupt ID */ | ||
1297 | #define UART_IIR_MSI 0x00 /* Modem status interrupt */ | ||
1298 | #define UART_IIR_THRI 0x02 /* Transmitter holding register empty */ | ||
1299 | #define UART_IIR_RDI 0x04 /* Receiver data interrupt */ | ||
1300 | #define UART_IIR_RLSI 0x06 /* Receiver line status interrupt */ | ||
1301 | |||
1302 | /* | ||
1303 | * These are the definitions for the Interrupt Enable Register | ||
1304 | */ | ||
1305 | #define UART_IER_MSI 0x08 /* Enable Modem status interrupt */ | ||
1306 | #define UART_IER_RLSI 0x04 /* Enable receiver line status interrupt */ | ||
1307 | #define UART_IER_THRI 0x02 /* Enable Transmitter holding register int. */ | ||
1308 | #define UART_IER_RDI 0x01 /* Enable receiver data interrupt */ | ||
1309 | |||
1310 | /* | ||
1311 | * These are the definitions for the Modem Control Register | ||
1312 | */ | ||
1313 | #define UART_MCR_LOOP 0x10 /* Enable loopback test mode */ | ||
1314 | #define UART_MCR_OUT2 0x08 /* Out2 complement */ | ||
1315 | #define UART_MCR_OUT1 0x04 /* Out1 complement */ | ||
1316 | #define UART_MCR_RTS 0x02 /* RTS complement */ | ||
1317 | #define UART_MCR_DTR 0x01 /* DTR complement */ | ||
1318 | |||
1319 | /* | ||
1320 | * These are the definitions for the Modem Status Register | ||
1321 | */ | ||
1322 | #define UART_MSR_DCD 0x80 /* Data Carrier Detect */ | ||
1323 | #define UART_MSR_RI 0x40 /* Ring Indicator */ | ||
1324 | #define UART_MSR_DSR 0x20 /* Data Set Ready */ | ||
1325 | #define UART_MSR_CTS 0x10 /* Clear to Send */ | ||
1326 | #define UART_MSR_DDCD 0x08 /* Delta DCD */ | ||
1327 | #define UART_MSR_TERI 0x04 /* Trailing edge ring indicator */ | ||
1328 | #define UART_MSR_DDSR 0x02 /* Delta DSR */ | ||
1329 | #define UART_MSR_DCTS 0x01 /* Delta CTS */ | ||
1330 | #define UART_MSR_ANY_DELTA 0x0F /* Any of the delta bits! */ | ||
1331 | |||
1332 | /* SSIO */ | 1271 | /* SSIO */ |
1333 | #define SSI0_STATUS 0xB1600000 | 1272 | #define SSI0_STATUS 0xB1600000 |
1334 | # define SSI_STATUS_BF (1 << 4) | 1273 | # define SSI_STATUS_BF (1 << 4) |
@@ -1720,7 +1659,7 @@ enum soc_au1200_ints { | |||
1720 | #define IOPORT_RESOURCE_START 0x00001000 /* skip legacy probing */ | 1659 | #define IOPORT_RESOURCE_START 0x00001000 /* skip legacy probing */ |
1721 | #define IOPORT_RESOURCE_END 0xffffffff | 1660 | #define IOPORT_RESOURCE_END 0xffffffff |
1722 | #define IOMEM_RESOURCE_START 0x10000000 | 1661 | #define IOMEM_RESOURCE_START 0x10000000 |
1723 | #define IOMEM_RESOURCE_END 0xffffffff | 1662 | #define IOMEM_RESOURCE_END 0xfffffffffULL |
1724 | 1663 | ||
1725 | #else /* Au1000 and Au1100 and Au1200 */ | 1664 | #else /* Au1000 and Au1100 and Au1200 */ |
1726 | 1665 | ||
@@ -1728,7 +1667,7 @@ enum soc_au1200_ints { | |||
1728 | #define IOPORT_RESOURCE_START 0x10000000 | 1667 | #define IOPORT_RESOURCE_START 0x10000000 |
1729 | #define IOPORT_RESOURCE_END 0xffffffff | 1668 | #define IOPORT_RESOURCE_END 0xffffffff |
1730 | #define IOMEM_RESOURCE_START 0x10000000 | 1669 | #define IOMEM_RESOURCE_START 0x10000000 |
1731 | #define IOMEM_RESOURCE_END 0xffffffff | 1670 | #define IOMEM_RESOURCE_END 0xfffffffffULL |
1732 | 1671 | ||
1733 | #define PCI_IO_START 0 | 1672 | #define PCI_IO_START 0 |
1734 | #define PCI_IO_END 0 | 1673 | #define PCI_IO_END 0 |
@@ -1739,53 +1678,4 @@ enum soc_au1200_ints { | |||
1739 | 1678 | ||
1740 | #endif | 1679 | #endif |
1741 | 1680 | ||
1742 | #ifndef _LANGUAGE_ASSEMBLY | ||
1743 | typedef volatile struct { | ||
1744 | /* 0x0000 */ u32 toytrim; | ||
1745 | /* 0x0004 */ u32 toywrite; | ||
1746 | /* 0x0008 */ u32 toymatch0; | ||
1747 | /* 0x000C */ u32 toymatch1; | ||
1748 | /* 0x0010 */ u32 toymatch2; | ||
1749 | /* 0x0014 */ u32 cntrctrl; | ||
1750 | /* 0x0018 */ u32 scratch0; | ||
1751 | /* 0x001C */ u32 scratch1; | ||
1752 | /* 0x0020 */ u32 freqctrl0; | ||
1753 | /* 0x0024 */ u32 freqctrl1; | ||
1754 | /* 0x0028 */ u32 clksrc; | ||
1755 | /* 0x002C */ u32 pinfunc; | ||
1756 | /* 0x0030 */ u32 reserved0; | ||
1757 | /* 0x0034 */ u32 wakemsk; | ||
1758 | /* 0x0038 */ u32 endian; | ||
1759 | /* 0x003C */ u32 powerctrl; | ||
1760 | /* 0x0040 */ u32 toyread; | ||
1761 | /* 0x0044 */ u32 rtctrim; | ||
1762 | /* 0x0048 */ u32 rtcwrite; | ||
1763 | /* 0x004C */ u32 rtcmatch0; | ||
1764 | /* 0x0050 */ u32 rtcmatch1; | ||
1765 | /* 0x0054 */ u32 rtcmatch2; | ||
1766 | /* 0x0058 */ u32 rtcread; | ||
1767 | /* 0x005C */ u32 wakesrc; | ||
1768 | /* 0x0060 */ u32 cpupll; | ||
1769 | /* 0x0064 */ u32 auxpll; | ||
1770 | /* 0x0068 */ u32 reserved1; | ||
1771 | /* 0x006C */ u32 reserved2; | ||
1772 | /* 0x0070 */ u32 reserved3; | ||
1773 | /* 0x0074 */ u32 reserved4; | ||
1774 | /* 0x0078 */ u32 slppwr; | ||
1775 | /* 0x007C */ u32 sleep; | ||
1776 | /* 0x0080 */ u32 reserved5[32]; | ||
1777 | /* 0x0100 */ u32 trioutrd; | ||
1778 | #define trioutclr trioutrd | ||
1779 | /* 0x0104 */ u32 reserved6; | ||
1780 | /* 0x0108 */ u32 outputrd; | ||
1781 | #define outputset outputrd | ||
1782 | /* 0x010C */ u32 outputclr; | ||
1783 | /* 0x0110 */ u32 pinstaterd; | ||
1784 | #define pininputen pinstaterd | ||
1785 | } AU1X00_SYS; | ||
1786 | |||
1787 | static AU1X00_SYS * const sys = (AU1X00_SYS *)SYS_BASE; | ||
1788 | |||
1789 | #endif | ||
1790 | |||
1791 | #endif | 1681 | #endif |
diff --git a/arch/mips/include/asm/mach-au1x00/au1100_mmc.h b/arch/mips/include/asm/mach-au1x00/au1100_mmc.h index c35e20918490..94000a3b6f0b 100644 --- a/arch/mips/include/asm/mach-au1x00/au1100_mmc.h +++ b/arch/mips/include/asm/mach-au1x00/au1100_mmc.h | |||
@@ -46,6 +46,7 @@ struct au1xmmc_platform_data { | |||
46 | int(*card_readonly)(void *mmc_host); | 46 | int(*card_readonly)(void *mmc_host); |
47 | void(*set_power)(void *mmc_host, int state); | 47 | void(*set_power)(void *mmc_host, int state); |
48 | struct led_classdev *led; | 48 | struct led_classdev *led; |
49 | unsigned long mask_host_caps; | ||
49 | }; | 50 | }; |
50 | 51 | ||
51 | #define SD0_BASE 0xB0600000 | 52 | #define SD0_BASE 0xB0600000 |
@@ -205,4 +206,3 @@ struct au1xmmc_platform_data { | |||
205 | 206 | ||
206 | 207 | ||
207 | #endif /* __ASM_AU1100_MMC_H */ | 208 | #endif /* __ASM_AU1100_MMC_H */ |
208 | |||
diff --git a/arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h b/arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h index d206000fbfe2..8c6b1105ce0b 100644 --- a/arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h +++ b/arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h | |||
@@ -339,8 +339,8 @@ u32 au1xxx_dbdma_set_devwidth(u32 chanid, int bits); | |||
339 | u32 au1xxx_dbdma_ring_alloc(u32 chanid, int entries); | 339 | u32 au1xxx_dbdma_ring_alloc(u32 chanid, int entries); |
340 | 340 | ||
341 | /* Put buffers on source/destination descriptors. */ | 341 | /* Put buffers on source/destination descriptors. */ |
342 | u32 _au1xxx_dbdma_put_source(u32 chanid, void *buf, int nbytes, u32 flags); | 342 | u32 au1xxx_dbdma_put_source(u32 chanid, dma_addr_t buf, int nbytes, u32 flags); |
343 | u32 _au1xxx_dbdma_put_dest(u32 chanid, void *buf, int nbytes, u32 flags); | 343 | u32 au1xxx_dbdma_put_dest(u32 chanid, dma_addr_t buf, int nbytes, u32 flags); |
344 | 344 | ||
345 | /* Get a buffer from the destination descriptor. */ | 345 | /* Get a buffer from the destination descriptor. */ |
346 | u32 au1xxx_dbdma_get_dest(u32 chanid, void **buf, int *nbytes); | 346 | u32 au1xxx_dbdma_get_dest(u32 chanid, void **buf, int *nbytes); |
@@ -363,25 +363,6 @@ void au1xxx_dbdma_suspend(void); | |||
363 | void au1xxx_dbdma_resume(void); | 363 | void au1xxx_dbdma_resume(void); |
364 | #endif | 364 | #endif |
365 | 365 | ||
366 | |||
367 | /* | ||
368 | * Some compatibilty macros -- needed to make changes to API | ||
369 | * without breaking existing drivers. | ||
370 | */ | ||
371 | #define au1xxx_dbdma_put_source(chanid, buf, nbytes) \ | ||
372 | _au1xxx_dbdma_put_source(chanid, buf, nbytes, DDMA_FLAGS_IE) | ||
373 | #define au1xxx_dbdma_put_source_flags(chanid, buf, nbytes, flags) \ | ||
374 | _au1xxx_dbdma_put_source(chanid, buf, nbytes, flags) | ||
375 | #define put_source_flags(chanid, buf, nbytes, flags) \ | ||
376 | au1xxx_dbdma_put_source_flags(chanid, buf, nbytes, flags) | ||
377 | |||
378 | #define au1xxx_dbdma_put_dest(chanid, buf, nbytes) \ | ||
379 | _au1xxx_dbdma_put_dest(chanid, buf, nbytes, DDMA_FLAGS_IE) | ||
380 | #define au1xxx_dbdma_put_dest_flags(chanid, buf, nbytes, flags) \ | ||
381 | _au1xxx_dbdma_put_dest(chanid, buf, nbytes, flags) | ||
382 | #define put_dest_flags(chanid, buf, nbytes, flags) \ | ||
383 | au1xxx_dbdma_put_dest_flags(chanid, buf, nbytes, flags) | ||
384 | |||
385 | /* | 366 | /* |
386 | * Flags for the put_source/put_dest functions. | 367 | * Flags for the put_source/put_dest functions. |
387 | */ | 368 | */ |
diff --git a/arch/mips/include/asm/mach-au1x00/au1xxx_eth.h b/arch/mips/include/asm/mach-au1x00/au1xxx_eth.h new file mode 100644 index 000000000000..bae9b758fcde --- /dev/null +++ b/arch/mips/include/asm/mach-au1x00/au1xxx_eth.h | |||
@@ -0,0 +1,17 @@ | |||
1 | #ifndef __AU1X00_ETH_DATA_H | ||
2 | #define __AU1X00_ETH_DATA_H | ||
3 | |||
4 | /* Platform specific PHY configuration passed to the MAC driver */ | ||
5 | struct au1000_eth_platform_data { | ||
6 | int phy_static_config; | ||
7 | int phy_search_highest_addr; | ||
8 | int phy1_search_mac0; | ||
9 | int phy_addr; | ||
10 | int phy_busid; | ||
11 | int phy_irq; | ||
12 | }; | ||
13 | |||
14 | void __init au1xxx_override_eth_cfg(unsigned port, | ||
15 | struct au1000_eth_platform_data *eth_data); | ||
16 | |||
17 | #endif /* __AU1X00_ETH_DATA_H */ | ||
diff --git a/arch/mips/include/asm/mach-au1x00/gpio-au1000.h b/arch/mips/include/asm/mach-au1x00/gpio-au1000.h index 91595fa89034..62d2f136d941 100644 --- a/arch/mips/include/asm/mach-au1x00/gpio-au1000.h +++ b/arch/mips/include/asm/mach-au1x00/gpio-au1000.h | |||
@@ -35,15 +35,13 @@ static inline int au1000_gpio2_to_irq(int gpio) | |||
35 | return -ENXIO; | 35 | return -ENXIO; |
36 | } | 36 | } |
37 | 37 | ||
38 | #ifdef CONFIG_SOC_AU1000 | ||
39 | static inline int au1000_irq_to_gpio(int irq) | 38 | static inline int au1000_irq_to_gpio(int irq) |
40 | { | 39 | { |
41 | if ((irq >= AU1000_GPIO_0) && (irq <= AU1000_GPIO_31)) | 40 | if ((irq >= AU1000_GPIO0_INT) && (irq <= AU1000_GPIO31_INT)) |
42 | return ALCHEMY_GPIO1_BASE + (irq - AU1000_GPIO_0) + 0; | 41 | return ALCHEMY_GPIO1_BASE + (irq - AU1000_GPIO0_INT) + 0; |
43 | 42 | ||
44 | return -ENXIO; | 43 | return -ENXIO; |
45 | } | 44 | } |
46 | #endif | ||
47 | 45 | ||
48 | static inline int au1500_gpio1_to_irq(int gpio) | 46 | static inline int au1500_gpio1_to_irq(int gpio) |
49 | { | 47 | { |
@@ -71,27 +69,25 @@ static inline int au1500_gpio2_to_irq(int gpio) | |||
71 | return -ENXIO; | 69 | return -ENXIO; |
72 | } | 70 | } |
73 | 71 | ||
74 | #ifdef CONFIG_SOC_AU1500 | ||
75 | static inline int au1500_irq_to_gpio(int irq) | 72 | static inline int au1500_irq_to_gpio(int irq) |
76 | { | 73 | { |
77 | switch (irq) { | 74 | switch (irq) { |
78 | case AU1000_GPIO_0 ... AU1000_GPIO_15: | 75 | case AU1500_GPIO0_INT ... AU1500_GPIO15_INT: |
79 | case AU1500_GPIO_20: | 76 | case AU1500_GPIO20_INT: |
80 | case AU1500_GPIO_23 ... AU1500_GPIO_28: | 77 | case AU1500_GPIO23_INT ... AU1500_GPIO28_INT: |
81 | return ALCHEMY_GPIO1_BASE + (irq - AU1000_GPIO_0) + 0; | 78 | return ALCHEMY_GPIO1_BASE + (irq - AU1500_GPIO0_INT) + 0; |
82 | case AU1500_GPIO_200 ... AU1500_GPIO_203: | 79 | case AU1500_GPIO200_INT ... AU1500_GPIO203_INT: |
83 | return ALCHEMY_GPIO2_BASE + (irq - AU1500_GPIO_200) + 0; | 80 | return ALCHEMY_GPIO2_BASE + (irq - AU1500_GPIO200_INT) + 0; |
84 | case AU1500_GPIO_204 ... AU1500_GPIO_205: | 81 | case AU1500_GPIO204_INT ... AU1500_GPIO205_INT: |
85 | return ALCHEMY_GPIO2_BASE + (irq - AU1500_GPIO_204) + 4; | 82 | return ALCHEMY_GPIO2_BASE + (irq - AU1500_GPIO204_INT) + 4; |
86 | case AU1500_GPIO_206 ... AU1500_GPIO_207: | 83 | case AU1500_GPIO206_INT ... AU1500_GPIO207_INT: |
87 | return ALCHEMY_GPIO2_BASE + (irq - AU1500_GPIO_206) + 6; | 84 | return ALCHEMY_GPIO2_BASE + (irq - AU1500_GPIO206_INT) + 6; |
88 | case AU1500_GPIO_208_215: | 85 | case AU1500_GPIO208_215_INT: |
89 | return ALCHEMY_GPIO2_BASE + 8; | 86 | return ALCHEMY_GPIO2_BASE + 8; |
90 | } | 87 | } |
91 | 88 | ||
92 | return -ENXIO; | 89 | return -ENXIO; |
93 | } | 90 | } |
94 | #endif | ||
95 | 91 | ||
96 | static inline int au1100_gpio1_to_irq(int gpio) | 92 | static inline int au1100_gpio1_to_irq(int gpio) |
97 | { | 93 | { |
@@ -108,19 +104,17 @@ static inline int au1100_gpio2_to_irq(int gpio) | |||
108 | return -ENXIO; | 104 | return -ENXIO; |
109 | } | 105 | } |
110 | 106 | ||
111 | #ifdef CONFIG_SOC_AU1100 | ||
112 | static inline int au1100_irq_to_gpio(int irq) | 107 | static inline int au1100_irq_to_gpio(int irq) |
113 | { | 108 | { |
114 | switch (irq) { | 109 | switch (irq) { |
115 | case AU1000_GPIO_0 ... AU1000_GPIO_31: | 110 | case AU1100_GPIO0_INT ... AU1100_GPIO31_INT: |
116 | return ALCHEMY_GPIO1_BASE + (irq - AU1000_GPIO_0) + 0; | 111 | return ALCHEMY_GPIO1_BASE + (irq - AU1100_GPIO0_INT) + 0; |
117 | case AU1100_GPIO_208_215: | 112 | case AU1100_GPIO208_215_INT: |
118 | return ALCHEMY_GPIO2_BASE + 8; | 113 | return ALCHEMY_GPIO2_BASE + 8; |
119 | } | 114 | } |
120 | 115 | ||
121 | return -ENXIO; | 116 | return -ENXIO; |
122 | } | 117 | } |
123 | #endif | ||
124 | 118 | ||
125 | static inline int au1550_gpio1_to_irq(int gpio) | 119 | static inline int au1550_gpio1_to_irq(int gpio) |
126 | { | 120 | { |
@@ -149,24 +143,22 @@ static inline int au1550_gpio2_to_irq(int gpio) | |||
149 | return -ENXIO; | 143 | return -ENXIO; |
150 | } | 144 | } |
151 | 145 | ||
152 | #ifdef CONFIG_SOC_AU1550 | ||
153 | static inline int au1550_irq_to_gpio(int irq) | 146 | static inline int au1550_irq_to_gpio(int irq) |
154 | { | 147 | { |
155 | switch (irq) { | 148 | switch (irq) { |
156 | case AU1000_GPIO_0 ... AU1000_GPIO_15: | 149 | case AU1550_GPIO0_INT ... AU1550_GPIO15_INT: |
157 | return ALCHEMY_GPIO1_BASE + (irq - AU1000_GPIO_0) + 0; | 150 | return ALCHEMY_GPIO1_BASE + (irq - AU1550_GPIO0_INT) + 0; |
158 | case AU1550_GPIO_200: | 151 | case AU1550_GPIO200_INT: |
159 | case AU1500_GPIO_201_205: | 152 | case AU1550_GPIO201_205_INT: |
160 | return ALCHEMY_GPIO2_BASE + (irq - AU1550_GPIO_200) + 0; | 153 | return ALCHEMY_GPIO2_BASE + (irq - AU1550_GPIO200_INT) + 0; |
161 | case AU1500_GPIO_16 ... AU1500_GPIO_28: | 154 | case AU1550_GPIO16_INT ... AU1550_GPIO28_INT: |
162 | return ALCHEMY_GPIO1_BASE + (irq - AU1500_GPIO_16) + 16; | 155 | return ALCHEMY_GPIO1_BASE + (irq - AU1550_GPIO16_INT) + 16; |
163 | case AU1500_GPIO_206 ... AU1500_GPIO_208_218: | 156 | case AU1550_GPIO206_INT ... AU1550_GPIO208_215_INT: |
164 | return ALCHEMY_GPIO2_BASE + (irq - AU1500_GPIO_206) + 6; | 157 | return ALCHEMY_GPIO2_BASE + (irq - AU1550_GPIO206_INT) + 6; |
165 | } | 158 | } |
166 | 159 | ||
167 | return -ENXIO; | 160 | return -ENXIO; |
168 | } | 161 | } |
169 | #endif | ||
170 | 162 | ||
171 | static inline int au1200_gpio1_to_irq(int gpio) | 163 | static inline int au1200_gpio1_to_irq(int gpio) |
172 | { | 164 | { |
@@ -187,23 +179,21 @@ static inline int au1200_gpio2_to_irq(int gpio) | |||
187 | return -ENXIO; | 179 | return -ENXIO; |
188 | } | 180 | } |
189 | 181 | ||
190 | #ifdef CONFIG_SOC_AU1200 | ||
191 | static inline int au1200_irq_to_gpio(int irq) | 182 | static inline int au1200_irq_to_gpio(int irq) |
192 | { | 183 | { |
193 | switch (irq) { | 184 | switch (irq) { |
194 | case AU1000_GPIO_0 ... AU1000_GPIO_31: | 185 | case AU1200_GPIO0_INT ... AU1200_GPIO31_INT: |
195 | return ALCHEMY_GPIO1_BASE + (irq - AU1000_GPIO_0) + 0; | 186 | return ALCHEMY_GPIO1_BASE + (irq - AU1200_GPIO0_INT) + 0; |
196 | case AU1200_GPIO_200 ... AU1200_GPIO_202: | 187 | case AU1200_GPIO200_INT ... AU1200_GPIO202_INT: |
197 | return ALCHEMY_GPIO2_BASE + (irq - AU1200_GPIO_200) + 0; | 188 | return ALCHEMY_GPIO2_BASE + (irq - AU1200_GPIO200_INT) + 0; |
198 | case AU1200_GPIO_203: | 189 | case AU1200_GPIO203_INT: |
199 | return ALCHEMY_GPIO2_BASE + 3; | 190 | return ALCHEMY_GPIO2_BASE + 3; |
200 | case AU1200_GPIO_204 ... AU1200_GPIO_208_215: | 191 | case AU1200_GPIO204_INT ... AU1200_GPIO208_215_INT: |
201 | return ALCHEMY_GPIO2_BASE + (irq - AU1200_GPIO_204) + 4; | 192 | return ALCHEMY_GPIO2_BASE + (irq - AU1200_GPIO204_INT) + 4; |
202 | } | 193 | } |
203 | 194 | ||
204 | return -ENXIO; | 195 | return -ENXIO; |
205 | } | 196 | } |
206 | #endif | ||
207 | 197 | ||
208 | /* | 198 | /* |
209 | * GPIO1 block macros for common linux gpio functions. | 199 | * GPIO1 block macros for common linux gpio functions. |
@@ -246,19 +236,19 @@ static inline int alchemy_gpio1_is_valid(int gpio) | |||
246 | 236 | ||
247 | static inline int alchemy_gpio1_to_irq(int gpio) | 237 | static inline int alchemy_gpio1_to_irq(int gpio) |
248 | { | 238 | { |
249 | #if defined(CONFIG_SOC_AU1000) | 239 | switch (alchemy_get_cputype()) { |
250 | return au1000_gpio1_to_irq(gpio); | 240 | case ALCHEMY_CPU_AU1000: |
251 | #elif defined(CONFIG_SOC_AU1100) | 241 | return au1000_gpio1_to_irq(gpio); |
252 | return au1100_gpio1_to_irq(gpio); | 242 | case ALCHEMY_CPU_AU1100: |
253 | #elif defined(CONFIG_SOC_AU1500) | 243 | return au1100_gpio1_to_irq(gpio); |
254 | return au1500_gpio1_to_irq(gpio); | 244 | case ALCHEMY_CPU_AU1500: |
255 | #elif defined(CONFIG_SOC_AU1550) | 245 | return au1500_gpio1_to_irq(gpio); |
256 | return au1550_gpio1_to_irq(gpio); | 246 | case ALCHEMY_CPU_AU1550: |
257 | #elif defined(CONFIG_SOC_AU1200) | 247 | return au1550_gpio1_to_irq(gpio); |
258 | return au1200_gpio1_to_irq(gpio); | 248 | case ALCHEMY_CPU_AU1200: |
259 | #else | 249 | return au1200_gpio1_to_irq(gpio); |
250 | } | ||
260 | return -ENXIO; | 251 | return -ENXIO; |
261 | #endif | ||
262 | } | 252 | } |
263 | 253 | ||
264 | /* | 254 | /* |
@@ -316,19 +306,19 @@ static inline int alchemy_gpio2_is_valid(int gpio) | |||
316 | 306 | ||
317 | static inline int alchemy_gpio2_to_irq(int gpio) | 307 | static inline int alchemy_gpio2_to_irq(int gpio) |
318 | { | 308 | { |
319 | #if defined(CONFIG_SOC_AU1000) | 309 | switch (alchemy_get_cputype()) { |
320 | return au1000_gpio2_to_irq(gpio); | 310 | case ALCHEMY_CPU_AU1000: |
321 | #elif defined(CONFIG_SOC_AU1100) | 311 | return au1000_gpio2_to_irq(gpio); |
322 | return au1100_gpio2_to_irq(gpio); | 312 | case ALCHEMY_CPU_AU1100: |
323 | #elif defined(CONFIG_SOC_AU1500) | 313 | return au1100_gpio2_to_irq(gpio); |
324 | return au1500_gpio2_to_irq(gpio); | 314 | case ALCHEMY_CPU_AU1500: |
325 | #elif defined(CONFIG_SOC_AU1550) | 315 | return au1500_gpio2_to_irq(gpio); |
326 | return au1550_gpio2_to_irq(gpio); | 316 | case ALCHEMY_CPU_AU1550: |
327 | #elif defined(CONFIG_SOC_AU1200) | 317 | return au1550_gpio2_to_irq(gpio); |
328 | return au1200_gpio2_to_irq(gpio); | 318 | case ALCHEMY_CPU_AU1200: |
329 | #else | 319 | return au1200_gpio2_to_irq(gpio); |
320 | } | ||
330 | return -ENXIO; | 321 | return -ENXIO; |
331 | #endif | ||
332 | } | 322 | } |
333 | 323 | ||
334 | /**********************************************************************/ | 324 | /**********************************************************************/ |
@@ -384,10 +374,13 @@ static inline void alchemy_gpio2_enable_int(int gpio2) | |||
384 | 374 | ||
385 | gpio2 -= ALCHEMY_GPIO2_BASE; | 375 | gpio2 -= ALCHEMY_GPIO2_BASE; |
386 | 376 | ||
387 | #if defined(CONFIG_SOC_AU1100) || defined(CONFIG_SOC_AU1500) | ||
388 | /* Au1100/Au1500 have GPIO208-215 enable bits at 0..7 */ | 377 | /* Au1100/Au1500 have GPIO208-215 enable bits at 0..7 */ |
389 | gpio2 -= 8; | 378 | switch (alchemy_get_cputype()) { |
390 | #endif | 379 | case ALCHEMY_CPU_AU1100: |
380 | case ALCHEMY_CPU_AU1500: | ||
381 | gpio2 -= 8; | ||
382 | } | ||
383 | |||
391 | local_irq_save(flags); | 384 | local_irq_save(flags); |
392 | __alchemy_gpio2_mod_int(gpio2, 1); | 385 | __alchemy_gpio2_mod_int(gpio2, 1); |
393 | local_irq_restore(flags); | 386 | local_irq_restore(flags); |
@@ -405,10 +398,13 @@ static inline void alchemy_gpio2_disable_int(int gpio2) | |||
405 | 398 | ||
406 | gpio2 -= ALCHEMY_GPIO2_BASE; | 399 | gpio2 -= ALCHEMY_GPIO2_BASE; |
407 | 400 | ||
408 | #if defined(CONFIG_SOC_AU1100) || defined(CONFIG_SOC_AU1500) | ||
409 | /* Au1100/Au1500 have GPIO208-215 enable bits at 0..7 */ | 401 | /* Au1100/Au1500 have GPIO208-215 enable bits at 0..7 */ |
410 | gpio2 -= 8; | 402 | switch (alchemy_get_cputype()) { |
411 | #endif | 403 | case ALCHEMY_CPU_AU1100: |
404 | case ALCHEMY_CPU_AU1500: | ||
405 | gpio2 -= 8; | ||
406 | } | ||
407 | |||
412 | local_irq_save(flags); | 408 | local_irq_save(flags); |
413 | __alchemy_gpio2_mod_int(gpio2, 0); | 409 | __alchemy_gpio2_mod_int(gpio2, 0); |
414 | local_irq_restore(flags); | 410 | local_irq_restore(flags); |
@@ -494,19 +490,19 @@ static inline int alchemy_gpio_to_irq(int gpio) | |||
494 | 490 | ||
495 | static inline int alchemy_irq_to_gpio(int irq) | 491 | static inline int alchemy_irq_to_gpio(int irq) |
496 | { | 492 | { |
497 | #if defined(CONFIG_SOC_AU1000) | 493 | switch (alchemy_get_cputype()) { |
498 | return au1000_irq_to_gpio(irq); | 494 | case ALCHEMY_CPU_AU1000: |
499 | #elif defined(CONFIG_SOC_AU1100) | 495 | return au1000_irq_to_gpio(irq); |
500 | return au1100_irq_to_gpio(irq); | 496 | case ALCHEMY_CPU_AU1100: |
501 | #elif defined(CONFIG_SOC_AU1500) | 497 | return au1100_irq_to_gpio(irq); |
502 | return au1500_irq_to_gpio(irq); | 498 | case ALCHEMY_CPU_AU1500: |
503 | #elif defined(CONFIG_SOC_AU1550) | 499 | return au1500_irq_to_gpio(irq); |
504 | return au1550_irq_to_gpio(irq); | 500 | case ALCHEMY_CPU_AU1550: |
505 | #elif defined(CONFIG_SOC_AU1200) | 501 | return au1550_irq_to_gpio(irq); |
506 | return au1200_irq_to_gpio(irq); | 502 | case ALCHEMY_CPU_AU1200: |
507 | #else | 503 | return au1200_irq_to_gpio(irq); |
504 | } | ||
508 | return -ENXIO; | 505 | return -ENXIO; |
509 | #endif | ||
510 | } | 506 | } |
511 | 507 | ||
512 | /**********************************************************************/ | 508 | /**********************************************************************/ |
diff --git a/arch/mips/include/asm/mach-au1x00/gpio.h b/arch/mips/include/asm/mach-au1x00/gpio.h index f9b7d41c659a..c3f60cdc3203 100644 --- a/arch/mips/include/asm/mach-au1x00/gpio.h +++ b/arch/mips/include/asm/mach-au1x00/gpio.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _ALCHEMY_GPIO_H_ | 1 | #ifndef _ALCHEMY_GPIO_H_ |
2 | #define _ALCHEMY_GPIO_H_ | 2 | #define _ALCHEMY_GPIO_H_ |
3 | 3 | ||
4 | #if defined(CONFIG_ALCHEMY_GPIO_AU1000) | 4 | #if defined(CONFIG_ALCHEMY_GPIOINT_AU1000) |
5 | 5 | ||
6 | #include <asm/mach-au1x00/gpio-au1000.h> | 6 | #include <asm/mach-au1x00/gpio-au1000.h> |
7 | 7 | ||
diff --git a/arch/mips/include/asm/mach-au1x00/ioremap.h b/arch/mips/include/asm/mach-au1x00/ioremap.h index 364cea2dc71f..75a94ad3ac91 100644 --- a/arch/mips/include/asm/mach-au1x00/ioremap.h +++ b/arch/mips/include/asm/mach-au1x00/ioremap.h | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | 13 | ||
14 | #ifdef CONFIG_64BIT_PHYS_ADDR | 14 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_PCI) |
15 | extern phys_t __fixup_bigphys_addr(phys_t, phys_t); | 15 | extern phys_t __fixup_bigphys_addr(phys_t, phys_t); |
16 | #else | 16 | #else |
17 | static inline phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size) | 17 | static inline phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size) |
diff --git a/arch/mips/include/asm/mach-au1x00/prom.h b/arch/mips/include/asm/mach-au1x00/prom.h index e38715577c51..4c0e09cf1735 100644 --- a/arch/mips/include/asm/mach-au1x00/prom.h +++ b/arch/mips/include/asm/mach-au1x00/prom.h | |||
@@ -6,7 +6,6 @@ extern char **prom_argv; | |||
6 | extern char **prom_envp; | 6 | extern char **prom_envp; |
7 | 7 | ||
8 | extern void prom_init_cmdline(void); | 8 | extern void prom_init_cmdline(void); |
9 | extern char *prom_getcmdline(void); | ||
10 | extern char *prom_getenv(char *envname); | 9 | extern char *prom_getenv(char *envname); |
11 | extern int prom_get_ethernet_addr(char *ethernet_addr); | 10 | extern int prom_get_ethernet_addr(char *ethernet_addr); |
12 | 11 | ||