aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-08-06 09:32:15 +0000
committerGabor Juhos <juhosg@openwrt.org>2009-08-06 09:32:15 +0000
commit05500844dbc92fa91fe965317e8944b21cf8dba8 (patch)
tree9c9b43d40ce45e3e5ee360cf0beda867a17d1058 /target/linux/ar71xx/files
parent89839845e0436c2fef8df55e8d735bbd454d632f (diff)
downloadupstream-05500844dbc92fa91fe965317e8944b21cf8dba8.tar.gz
upstream-05500844dbc92fa91fe965317e8944b21cf8dba8.tar.bz2
upstream-05500844dbc92fa91fe965317e8944b21cf8dba8.zip
[ar71xx] get rid of some ifdefs in the IRQ code
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17141 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/irq.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/irq.c b/target/linux/ar71xx/files/arch/mips/ar71xx/irq.c
index 6dcd9870f9..a778f5aab2 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/irq.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/irq.c
@@ -21,6 +21,8 @@
#include <asm/mach-ar71xx/ar71xx.h>
+static void (* ar71xx_ip2_irq_handler)(void) = spurious_interrupt;
+
#ifdef CONFIG_PCI
static void ar71xx_pci_irq_dispatch(void)
{
@@ -81,6 +83,8 @@ static void __init ar71xx_pci_irq_init(void)
{
int i;
+ ar71xx_ip2_irq_handler = ar71xx_pci_irq_dispatch;
+
ar71xx_reset_wr(AR71XX_RESET_REG_PCI_INT_ENABLE, 0);
ar71xx_reset_wr(AR71XX_RESET_REG_PCI_INT_STATUS, 0);
@@ -156,6 +160,8 @@ static void __init ar724x_pci_irq_init(void)
{
int i;
+ ar71xx_ip2_irq_handler = ar724x_pci_irq_dispatch;
+
ar724x_pci_wr(AR724X_PCI_REG_INT_MASK, 0);
ar724x_pci_wr(AR724X_PCI_REG_INT_STATUS, 0);
@@ -168,6 +174,9 @@ static void __init ar724x_pci_irq_init(void)
setup_irq(AR71XX_CPU_IRQ_PCI, &ar724x_pci_irqaction);
}
+#else
+static inline void ar71xx_pci_irq_init(void) {}
+static inline void ar724x_pci_irq_init(void) {}
#endif /* CONFIG_PCI */
static void ar71xx_gpio_irq_dispatch(void)
@@ -355,8 +364,6 @@ 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;
@@ -395,16 +402,10 @@ void __init arch_init_irq(void)
case AR71XX_SOC_AR7130:
case AR71XX_SOC_AR7141:
case AR71XX_SOC_AR7161:
-#ifdef CONFIG_PCI
ar71xx_pci_irq_init();
- ar71xx_ip2_irq_handler = ar71xx_pci_irq_dispatch;
-#endif
break;
case AR71XX_SOC_AR7240:
-#ifdef CONFIG_PCI
ar724x_pci_irq_init();
- ar71xx_ip2_irq_handler = ar724x_pci_irq_dispatch;
-#endif
break;
case AR71XX_SOC_AR9130:
case AR71XX_SOC_AR9132: