Minor fixes, do not count interrupts without interrupt source as spurious (#1755)
authorFlorian Fainelli <florian@openwrt.org>
Wed, 30 May 2007 09:48:57 +0000 (09:48 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Wed, 30 May 2007 09:48:57 +0000 (09:48 +0000)
SVN-Revision: 7391

target/linux/adm5120-2.6/files/arch/mips/adm5120/irq.c
target/linux/adm5120-2.6/files/arch/mips/adm5120/memory.c
target/linux/adm5120-2.6/files/arch/mips/adm5120/setup.c

index 46f3bb05ee4a344bd5a2071e5eb41f05debb8c47..c53272e1e0968c8cb4f853764a46f758f7760353 100644 (file)
@@ -48,11 +48,12 @@ void adm5120_hw0_irqdispatch(struct pt_regs *regs)
 
        intsrc = ADM5120_INTC_STATUS & ADM5120_IRQ_MASK;
 
-       for (i = 0; intsrc; intsrc >>= 1, i++)
-               if (intsrc & 0x1)
-                       do_IRQ(i);
-               else
-                       spurious_interrupt();
+       if (intsrc) {
+               for (i = 0; intsrc; intsrc >>= 1, i++)
+                       if (intsrc & 0x1)
+                               do_IRQ(i);
+       } else
+               spurious_interrupt();
 }
 
 void mips_timer_interrupt(struct pt_regs *regs)
index d96d66a17f48b6394682ca79174f8d2bb55c637e..947b5b96a838fcb27ed8274392fb0d66bb8cf159 100644 (file)
@@ -38,6 +38,7 @@
 #include <asm-mips/mips-boards/prom.h>
 
 extern char *prom_getenv(char *envname);
+void prom_printf(char *, ...);
 
 #define PFN_ALIGN(x)    (((unsigned long)(x) + (PAGE_SIZE - 1)) & PAGE_MASK)
 
index 3f4f3656106fdb1f33d1e4df52bc573efb15db4e..5767df8b234172ff007b313d7a5ef374818a6182 100644 (file)
@@ -75,6 +75,7 @@ const char *get_system_type(void)
        return adm5120_board_name();
 }
 
+#ifdef CONFIG_USB
 static struct resource adm5120_hcd_resources[] = {
        [0] = {
                .start  = 0x11200000,
@@ -104,4 +105,5 @@ static int __init adm5120_init(void)
        return platform_add_devices(devices, ARRAY_SIZE(devices));
 }
 
-subsys_initcall(adm5120_init);
+arch_initcall(adm5120_init);
+#endif