use SoC specific irq dispatch code
SVN-Revision: 13736
This commit is contained in:
parent
e90ad86d42
commit
067e900705
3 changed files with 24 additions and 5 deletions
|
@ -66,6 +66,7 @@
|
||||||
#define AR71XX_PCI_IRQ_COUNT 4
|
#define AR71XX_PCI_IRQ_COUNT 4
|
||||||
|
|
||||||
#define AR71XX_CPU_IRQ_PCI (AR71XX_CPU_IRQ_BASE + 2)
|
#define AR71XX_CPU_IRQ_PCI (AR71XX_CPU_IRQ_BASE + 2)
|
||||||
|
#define AR71XX_CPU_IRQ_WMAC (AR71XX_CPU_IRQ_BASE + 2)
|
||||||
#define AR71XX_CPU_IRQ_USB (AR71XX_CPU_IRQ_BASE + 3)
|
#define AR71XX_CPU_IRQ_USB (AR71XX_CPU_IRQ_BASE + 3)
|
||||||
#define AR71XX_CPU_IRQ_GE0 (AR71XX_CPU_IRQ_BASE + 4)
|
#define AR71XX_CPU_IRQ_GE0 (AR71XX_CPU_IRQ_BASE + 4)
|
||||||
#define AR71XX_CPU_IRQ_GE1 (AR71XX_CPU_IRQ_BASE + 5)
|
#define AR71XX_CPU_IRQ_GE1 (AR71XX_CPU_IRQ_BASE + 5)
|
||||||
|
|
|
@ -84,7 +84,6 @@ static void __init ar71xx_pci_irq_init(void)
|
||||||
|
|
||||||
setup_irq(AR71XX_CPU_IRQ_PCI, &ar71xx_pci_irqaction);
|
setup_irq(AR71XX_CPU_IRQ_PCI, &ar71xx_pci_irqaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_PCI */
|
#endif /* CONFIG_PCI */
|
||||||
|
|
||||||
static void ar71xx_gpio_irq_dispatch(void)
|
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);
|
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)
|
asmlinkage void plat_irq_dispatch(void)
|
||||||
{
|
{
|
||||||
unsigned long pending;
|
unsigned long pending;
|
||||||
|
@ -250,10 +256,8 @@ asmlinkage void plat_irq_dispatch(void)
|
||||||
if (pending & STATUSF_IP7)
|
if (pending & STATUSF_IP7)
|
||||||
do_IRQ(AR71XX_CPU_IRQ_TIMER);
|
do_IRQ(AR71XX_CPU_IRQ_TIMER);
|
||||||
|
|
||||||
#ifdef CONFIG_PCI
|
|
||||||
else if (pending & STATUSF_IP2)
|
else if (pending & STATUSF_IP2)
|
||||||
ar71xx_pci_irq_dispatch();
|
ar71xx_ip2_irq_handler();
|
||||||
#endif
|
|
||||||
|
|
||||||
else if (pending & STATUSF_IP4)
|
else if (pending & STATUSF_IP4)
|
||||||
do_IRQ(AR71XX_CPU_IRQ_GE0);
|
do_IRQ(AR71XX_CPU_IRQ_GE0);
|
||||||
|
@ -277,9 +281,22 @@ void __init arch_init_irq(void)
|
||||||
|
|
||||||
ar71xx_misc_irq_init();
|
ar71xx_misc_irq_init();
|
||||||
|
|
||||||
|
switch (ar71xx_soc) {
|
||||||
|
case AR71XX_SOC_AR7130:
|
||||||
|
case AR71XX_SOC_AR7141:
|
||||||
|
case AR71XX_SOC_AR7161:
|
||||||
#ifdef CONFIG_PCI
|
#ifdef CONFIG_PCI
|
||||||
ar71xx_pci_irq_init();
|
ar71xx_pci_irq_init();
|
||||||
|
ar71xx_ip2_irq_handler = ar71xx_pci_irq_dispatch;
|
||||||
#endif
|
#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();
|
ar71xx_gpio_irq_init();
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,6 +66,7 @@
|
||||||
#define AR71XX_PCI_IRQ_COUNT 4
|
#define AR71XX_PCI_IRQ_COUNT 4
|
||||||
|
|
||||||
#define AR71XX_CPU_IRQ_PCI (AR71XX_CPU_IRQ_BASE + 2)
|
#define AR71XX_CPU_IRQ_PCI (AR71XX_CPU_IRQ_BASE + 2)
|
||||||
|
#define AR71XX_CPU_IRQ_WMAC (AR71XX_CPU_IRQ_BASE + 2)
|
||||||
#define AR71XX_CPU_IRQ_USB (AR71XX_CPU_IRQ_BASE + 3)
|
#define AR71XX_CPU_IRQ_USB (AR71XX_CPU_IRQ_BASE + 3)
|
||||||
#define AR71XX_CPU_IRQ_GE0 (AR71XX_CPU_IRQ_BASE + 4)
|
#define AR71XX_CPU_IRQ_GE0 (AR71XX_CPU_IRQ_BASE + 4)
|
||||||
#define AR71XX_CPU_IRQ_GE1 (AR71XX_CPU_IRQ_BASE + 5)
|
#define AR71XX_CPU_IRQ_GE1 (AR71XX_CPU_IRQ_BASE + 5)
|
||||||
|
|
Loading…
Reference in a new issue