diff options
author | Ludovic Desroches <ludovic.desroches@atmel.com> | 2012-06-11 17:38:03 +0400 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-07-02 16:26:58 +0400 |
commit | 3e135466745a62b1814edef74c7b4a25e6bda707 (patch) | |
tree | 77949a25a79b63bba42eb9485e2655d68007ae79 /arch/arm/mach-at91/irq.c | |
parent | 3a6b37134c71be1b085be7fe5234f364dc68e2de (diff) | |
download | linux-3e135466745a62b1814edef74c7b4a25e6bda707.tar.xz |
ARM: at91: at91 based machines specify their own irq handler at run time
SOC_AT91SAM9 selects MULTI_IRQ_HANDLER in order to let machines specify their
own IRQ handler at run time.
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91/irq.c')
-rw-r--r-- | arch/arm/mach-at91/irq.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/irq.c b/arch/arm/mach-at91/irq.c index db8e14112eda..390d4df21ef6 100644 --- a/arch/arm/mach-at91/irq.c +++ b/arch/arm/mach-at91/irq.c @@ -36,6 +36,7 @@ #include <asm/irq.h> #include <asm/setup.h> +#include <asm/exception.h> #include <asm/mach/arch.h> #include <asm/mach/irq.h> #include <asm/mach/map.h> @@ -45,6 +46,24 @@ static struct irq_domain *at91_aic_domain; static struct device_node *at91_aic_np; static unsigned int *at91_aic_irq_priorities; +asmlinkage void __exception_irq_entry at91_aic_handle_irq(struct pt_regs *regs) +{ + u32 irqnr; + u32 irqstat; + + irqnr = at91_aic_read(AT91_AIC_IVR); + irqstat = at91_aic_read(AT91_AIC_ISR); + + /* + * ISR value is 0 when there is no current interrupt or when there is + * a spurious interrupt + */ + if (!irqstat) + at91_aic_write(AT91_AIC_EOICR, 0); + else + handle_IRQ(irqnr, regs); +} + static void at91_aic_mask_irq(struct irq_data *d) { /* Disable interrupt on AIC */ |