diff options
Diffstat (limited to 'arch/mips/au1000')
-rw-r--r-- | arch/mips/au1000/mtx-1/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/au1000/mtx-1/platform.c | 9 | ||||
-rw-r--r-- | arch/mips/au1000/pb1200/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/au1000/pb1200/board_setup.c | 6 | ||||
-rw-r--r-- | arch/mips/au1000/pb1200/irqmap.c | 100 |
5 files changed, 65 insertions, 54 deletions
diff --git a/arch/mips/au1000/mtx-1/Makefile b/arch/mips/au1000/mtx-1/Makefile index afa7007..85a9094 100644 --- a/arch/mips/au1000/mtx-1/Makefile +++ b/arch/mips/au1000/mtx-1/Makefile @@ -9,3 +9,5 @@ lib-y := init.o board_setup.o irqmap.o obj-y := platform.o + +EXTRA_CFLAGS += -Werror diff --git a/arch/mips/au1000/mtx-1/platform.c b/arch/mips/au1000/mtx-1/platform.c index 01ebff6..49c0fb4 100644 --- a/arch/mips/au1000/mtx-1/platform.c +++ b/arch/mips/au1000/mtx-1/platform.c @@ -34,15 +34,6 @@ static struct resource mtx1_wdt_res[] = { } }; -static struct resource mtx1_sys_btn[] = { - [0] = { - .start = 7, - .end = 7, - .name = "mtx1-sys-btn-gpio", - .flags = IORESOURCE_IRQ, - } -}; - static struct platform_device mtx1_wdt = { .name = "mtx1-wdt", .id = 0, diff --git a/arch/mips/au1000/pb1200/Makefile b/arch/mips/au1000/pb1200/Makefile index 22b673c..970b1b1 100644 --- a/arch/mips/au1000/pb1200/Makefile +++ b/arch/mips/au1000/pb1200/Makefile @@ -3,3 +3,5 @@ # lib-y := init.o board_setup.o irqmap.o + +EXTRA_CFLAGS += -Werror diff --git a/arch/mips/au1000/pb1200/board_setup.c b/arch/mips/au1000/pb1200/board_setup.c index 5dbc986..b98bebf 100644 --- a/arch/mips/au1000/pb1200/board_setup.c +++ b/arch/mips/au1000/pb1200/board_setup.c @@ -68,9 +68,11 @@ void board_reset(void) void __init board_setup(void) { char *argptr = NULL; - u32 pin_func; #if 0 + { + u32 pin_func; + /* Enable PSC1 SYNC for AC97. Normaly done in audio driver, * but it is board specific code, so put it here. */ @@ -81,11 +83,13 @@ void __init board_setup(void) au_writel(0, (u32)bcsr|0x10); /* turn off pcmcia power */ au_sync(); + } #endif #if defined(CONFIG_I2C_AU1550) { u32 freq0, clksrc; + u32 pin_func; /* Select SMBUS in CPLD */ bcsr->resets &= ~(BCSR_RESETS_PCS0MUX); diff --git a/arch/mips/au1000/pb1200/irqmap.c b/arch/mips/au1000/pb1200/irqmap.c index bdf00e2..c096be4 100644 --- a/arch/mips/au1000/pb1200/irqmap.c +++ b/arch/mips/au1000/pb1200/irqmap.c @@ -94,51 +94,41 @@ inline void pb1200_disable_irq(unsigned int irq_nr) bcsr->intclr = 1<<(irq_nr - PB1200_INT_BEGIN); } -static unsigned int pb1200_startup_irq( unsigned int irq_nr ) +static unsigned int pb1200_setup_cascade(void) { - if (++pb1200_cascade_en == 1) - { - request_irq(AU1000_GPIO_7, &pb1200_cascade_handler, - 0, "Pb1200 Cascade", (void *)&pb1200_cascade_handler ); -#ifdef CONFIG_MIPS_PB1200 - /* We have a problem with CPLD rev3. Enable a workaround */ - if( ((bcsr->whoami & BCSR_WHOAMI_CPLD)>>4) <= 3) - { - printk("\nWARNING!!!\n"); - printk("\nWARNING!!!\n"); - printk("\nWARNING!!!\n"); - printk("\nWARNING!!!\n"); - printk("\nWARNING!!!\n"); - printk("\nWARNING!!!\n"); - printk("Pb1200 must be at CPLD rev4. Please have Pb1200\n"); - printk("updated to latest revision. This software will not\n"); - printk("work on anything less than CPLD rev4\n"); - printk("\nWARNING!!!\n"); - printk("\nWARNING!!!\n"); - printk("\nWARNING!!!\n"); - printk("\nWARNING!!!\n"); - printk("\nWARNING!!!\n"); - printk("\nWARNING!!!\n"); - while(1); - } -#endif - } - pb1200_enable_irq(irq_nr); + int err; + + err = request_irq(AU1000_GPIO_7, &pb1200_cascade_handler, + 0, "Pb1200 Cascade", &pb1200_cascade_handler); + if (err) + return err; + return 0; } -static void pb1200_shutdown_irq( unsigned int irq_nr ) +static unsigned int pb1200_startup_irq(unsigned int irq) { - pb1200_disable_irq(irq_nr); - if (--pb1200_cascade_en == 0) - { - free_irq(AU1000_GPIO_7, &pb1200_cascade_handler ); + if (++pb1200_cascade_en == 1) { + int res; + + res = pb1200_setup_cascade(); + if (res) + return res; } - return; + + pb1200_enable_irq(irq); + + return 0; } -static struct irq_chip external_irq_type = +static void pb1200_shutdown_irq(unsigned int irq) { + pb1200_disable_irq(irq); + if (--pb1200_cascade_en == 0) + free_irq(AU1000_GPIO_7, &pb1200_cascade_handler); +} + +static struct irq_chip external_irq_type = { #ifdef CONFIG_MIPS_PB1200 .name = "Pb1200 Ext", #endif @@ -155,16 +145,38 @@ static struct irq_chip external_irq_type = void _board_init_irq(void) { - int irq_nr; + unsigned int irq; - for (irq_nr = PB1200_INT_BEGIN; irq_nr <= PB1200_INT_END; irq_nr++) - { - set_irq_chip_and_handler(irq_nr, &external_irq_type, +#ifdef CONFIG_MIPS_PB1200 + /* We have a problem with CPLD rev3. Enable a workaround */ + if (((bcsr->whoami & BCSR_WHOAMI_CPLD) >> 4) <= 3) { + printk("\nWARNING!!!\n"); + printk("\nWARNING!!!\n"); + printk("\nWARNING!!!\n"); + printk("\nWARNING!!!\n"); + printk("\nWARNING!!!\n"); + printk("\nWARNING!!!\n"); + printk("Pb1200 must be at CPLD rev4. Please have Pb1200\n"); + printk("updated to latest revision. This software will not\n"); + printk("work on anything less than CPLD rev4\n"); + printk("\nWARNING!!!\n"); + printk("\nWARNING!!!\n"); + printk("\nWARNING!!!\n"); + printk("\nWARNING!!!\n"); + printk("\nWARNING!!!\n"); + printk("\nWARNING!!!\n"); + panic("Game over. Your score is 0."); + } +#endif + + for (irq = PB1200_INT_BEGIN; irq <= PB1200_INT_END; irq++) { + set_irq_chip_and_handler(irq, &external_irq_type, handle_level_irq); - pb1200_disable_irq(irq_nr); + pb1200_disable_irq(irq); } - /* GPIO_7 can not be hooked here, so it is hooked upon first - request of any source attached to the cascade */ + /* + * GPIO_7 can not be hooked here, so it is hooked upon first + * request of any source attached to the cascade + */ } - |