diff options
author | Ludovic Desroches <ludovic.desroches@atmel.com> | 2012-06-11 09:38:03 -0400 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-07-02 08:26:58 -0400 |
commit | 3e135466745a62b1814edef74c7b4a25e6bda707 (patch) | |
tree | 77949a25a79b63bba42eb9485e2655d68007ae79 /arch/arm/mach-at91/irq.c | |
parent | 3a6b37134c71be1b085be7fe5234f364dc68e2de (diff) |
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 @@ | |||
36 | #include <asm/irq.h> | 36 | #include <asm/irq.h> |
37 | #include <asm/setup.h> | 37 | #include <asm/setup.h> |
38 | 38 | ||
39 | #include <asm/exception.h> | ||
39 | #include <asm/mach/arch.h> | 40 | #include <asm/mach/arch.h> |
40 | #include <asm/mach/irq.h> | 41 | #include <asm/mach/irq.h> |
41 | #include <asm/mach/map.h> | 42 | #include <asm/mach/map.h> |
@@ -45,6 +46,24 @@ static struct irq_domain *at91_aic_domain; | |||
45 | static struct device_node *at91_aic_np; | 46 | static struct device_node *at91_aic_np; |
46 | static unsigned int *at91_aic_irq_priorities; | 47 | static unsigned int *at91_aic_irq_priorities; |
47 | 48 | ||
49 | asmlinkage void __exception_irq_entry at91_aic_handle_irq(struct pt_regs *regs) | ||
50 | { | ||
51 | u32 irqnr; | ||
52 | u32 irqstat; | ||
53 | |||
54 | irqnr = at91_aic_read(AT91_AIC_IVR); | ||
55 | irqstat = at91_aic_read(AT91_AIC_ISR); | ||
56 | |||
57 | /* | ||
58 | * ISR value is 0 when there is no current interrupt or when there is | ||
59 | * a spurious interrupt | ||
60 | */ | ||
61 | if (!irqstat) | ||
62 | at91_aic_write(AT91_AIC_EOICR, 0); | ||
63 | else | ||
64 | handle_IRQ(irqnr, regs); | ||
65 | } | ||
66 | |||
48 | static void at91_aic_mask_irq(struct irq_data *d) | 67 | static void at91_aic_mask_irq(struct irq_data *d) |
49 | { | 68 | { |
50 | /* Disable interrupt on AIC */ | 69 | /* Disable interrupt on AIC */ |