refactor atheros system code - also add support for the reset button (sends netlink...
[openwrt.git] / target / linux / atheros-2.6 / files / arch / mips / atheros / board.c
index 7913d8d..1ea66c0 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/serial.h>
 #include <linux/serial_core.h>
 #include <asm/bootinfo.h>
+#include <asm/irq_cpu.h>
 #include <asm/io.h>
 #include "ar531x.h"
 
@@ -155,23 +156,23 @@ const char *get_system_type(void)
        switch (mips_machtype) {
 #ifdef CONFIG_ATHEROS_AR5312
        case MACH_ATHEROS_AR5312:
-               return "Atheros AR5312\n";
+               return "Atheros AR5312";
 
        case MACH_ATHEROS_AR2312:
-               return "Atheros AR2312\n";
+               return "Atheros AR2312";
                
        case MACH_ATHEROS_AR2313:
-               return "Atheros AR2313\n";
+               return "Atheros AR2313";
 #endif
 #ifdef CONFIG_ATHEROS_AR5315
        case MACH_ATHEROS_AR2315:
-               return "Atheros AR2315\n";
+               return "Atheros AR2315";
        case MACH_ATHEROS_AR2316:
-               return "Atheros AR2316\n";
+               return "Atheros AR2316";
        case MACH_ATHEROS_AR2317:
-               return "Atheros AR2317\n";
+               return "Atheros AR2317";
        case MACH_ATHEROS_AR2318:
-               return "Atheros AR2318\n";
+               return "Atheros AR2318";
 #endif
        }
        return "Atheros (unknown)";
@@ -189,4 +190,18 @@ void __init plat_timer_setup(struct irqaction *irq)
        write_c0_compare(count + 1000);
 }
 
+asmlinkage void plat_irq_dispatch(void)
+{
+       DO_AR5312(ar5312_irq_dispatch();)
+       DO_AR5315(ar5315_irq_dispatch();)
+}
 
+void __init arch_init_irq(void)
+{
+       clear_c0_status(ST0_IM);
+       mips_cpu_irq_init();
+
+       /* Initialize interrupt controllers */
+       DO_AR5312(ar5312_misc_intr_init(AR531X_MISC_IRQ_BASE);)
+       DO_AR5315(ar5315_misc_intr_init(AR531X_MISC_IRQ_BASE);)
+}
This page took 0.027415 seconds and 4 git commands to generate.