summaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/arch
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-12-23 13:59:04 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-12-23 13:59:04 +0000
commit2b020ab72106f0529f63a2c9c27ff4933f65494e (patch)
treef5c478e761b132687a0701c1b13406e703f927fd /target/linux/ar71xx/files/arch
parent2364018d031ff8ed14ac1bf7b2841983729568d9 (diff)
[ar71xx] use SoC specific irq dispatch code
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13736 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/arch')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/irq.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/irq.c b/target/linux/ar71xx/files/arch/mips/ar71xx/irq.c
index eda747441..0d5af43d7 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/irq.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/irq.c
@@ -84,7 +84,6 @@ static void __init ar71xx_pci_irq_init(void)
setup_irq(AR71XX_CPU_IRQ_PCI, &ar71xx_pci_irqaction);
}
-
#endif /* CONFIG_PCI */
static void ar71xx_gpio_irq_dispatch(void)
@@ -241,6 +240,13 @@ static void __init ar71xx_misc_irq_init(void)
setup_irq(AR71XX_CPU_IRQ_MISC, &ar71xx_misc_irqaction);
}
+static void ar913x_wmac_irq_dispatch(void)
+{
+ do_IRQ(AR71XX_CPU_IRQ_WMAC);
+}
+
+static void (* ar71xx_ip2_irq_handler)(void) = spurious_interrupt;
+
asmlinkage void plat_irq_dispatch(void)
{
unsigned long pending;
@@ -250,10 +256,8 @@ asmlinkage void plat_irq_dispatch(void)
if (pending & STATUSF_IP7)
do_IRQ(AR71XX_CPU_IRQ_TIMER);
-#ifdef CONFIG_PCI
else if (pending & STATUSF_IP2)
- ar71xx_pci_irq_dispatch();
-#endif
+ ar71xx_ip2_irq_handler();
else if (pending & STATUSF_IP4)
do_IRQ(AR71XX_CPU_IRQ_GE0);
@@ -277,9 +281,22 @@ void __init arch_init_irq(void)
ar71xx_misc_irq_init();
+ switch (ar71xx_soc) {
+ case AR71XX_SOC_AR7130:
+ case AR71XX_SOC_AR7141:
+ case AR71XX_SOC_AR7161:
#ifdef CONFIG_PCI
- ar71xx_pci_irq_init();
+ ar71xx_pci_irq_init();
+ ar71xx_ip2_irq_handler = ar71xx_pci_irq_dispatch;
#endif
+ break;
+ case AR71XX_SOC_AR9130:
+ case AR71XX_SOC_AR9132:
+ ar71xx_ip2_irq_handler = ar913x_wmac_irq_dispatch;
+ break;
+ default:
+ BUG();
+ }
ar71xx_gpio_irq_init();
}