diff options
author | Ludovic Desroches <ludovic.desroches@atmel.com> | 2012-05-25 08:11:51 -0400 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-07-02 08:26:57 -0400 |
commit | 42a859daaf6af4d234fcf964a421666d5cca3f6a (patch) | |
tree | a025e57314554a8547b1afd782c7982631298adb /arch/arm/mach-at91/irq.c | |
parent | f25b00be60ab3865308a89437af66b277b04f53e (diff) |
ARM: at91: aic can use fast eoi handler type
The Advanced Interrupt Controller allows us to use the fast EOI handler type.
It lets us remove the Atmel specific workaround into arch/arm/kernel/irq.c
used to indicate to the AIC the end of the interrupt treatment.
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm/mach-at91/irq.c')
-rw-r--r-- | arch/arm/mach-at91/irq.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/arch/arm/mach-at91/irq.c b/arch/arm/mach-at91/irq.c index cfcfcbe36269..2d5d4c88a527 100644 --- a/arch/arm/mach-at91/irq.c +++ b/arch/arm/mach-at91/irq.c | |||
@@ -55,6 +55,15 @@ static void at91_aic_unmask_irq(struct irq_data *d) | |||
55 | at91_aic_write(AT91_AIC_IECR, 1 << d->hwirq); | 55 | at91_aic_write(AT91_AIC_IECR, 1 << d->hwirq); |
56 | } | 56 | } |
57 | 57 | ||
58 | static void at91_aic_eoi(struct irq_data *d) | ||
59 | { | ||
60 | /* | ||
61 | * Mark end-of-interrupt on AIC, the controller doesn't care about | ||
62 | * the value written. Moreover it's a write-only register. | ||
63 | */ | ||
64 | at91_aic_write(AT91_AIC_EOICR, 0); | ||
65 | } | ||
66 | |||
58 | unsigned int at91_extern_irq; | 67 | unsigned int at91_extern_irq; |
59 | 68 | ||
60 | #define is_extern_irq(hwirq) ((1 << (hwirq)) & at91_extern_irq) | 69 | #define is_extern_irq(hwirq) ((1 << (hwirq)) & at91_extern_irq) |
@@ -128,11 +137,11 @@ void at91_irq_resume(void) | |||
128 | 137 | ||
129 | static struct irq_chip at91_aic_chip = { | 138 | static struct irq_chip at91_aic_chip = { |
130 | .name = "AIC", | 139 | .name = "AIC", |
131 | .irq_ack = at91_aic_mask_irq, | ||
132 | .irq_mask = at91_aic_mask_irq, | 140 | .irq_mask = at91_aic_mask_irq, |
133 | .irq_unmask = at91_aic_unmask_irq, | 141 | .irq_unmask = at91_aic_unmask_irq, |
134 | .irq_set_type = at91_aic_set_type, | 142 | .irq_set_type = at91_aic_set_type, |
135 | .irq_set_wake = at91_aic_set_wake, | 143 | .irq_set_wake = at91_aic_set_wake, |
144 | .irq_eoi = at91_aic_eoi, | ||
136 | }; | 145 | }; |
137 | 146 | ||
138 | static void __init at91_aic_hw_init(unsigned int spu_vector) | 147 | static void __init at91_aic_hw_init(unsigned int spu_vector) |
@@ -171,7 +180,7 @@ static int at91_aic_irq_map(struct irq_domain *h, unsigned int virq, | |||
171 | /* Active Low interrupt, without priority */ | 180 | /* Active Low interrupt, without priority */ |
172 | at91_aic_write(AT91_AIC_SMR(hw), AT91_AIC_SRCTYPE_LOW); | 181 | at91_aic_write(AT91_AIC_SMR(hw), AT91_AIC_SRCTYPE_LOW); |
173 | 182 | ||
174 | irq_set_chip_and_handler(virq, &at91_aic_chip, handle_level_irq); | 183 | irq_set_chip_and_handler(virq, &at91_aic_chip, handle_fasteoi_irq); |
175 | set_irq_flags(virq, IRQF_VALID | IRQF_PROBE); | 184 | set_irq_flags(virq, IRQF_VALID | IRQF_PROBE); |
176 | 185 | ||
177 | return 0; | 186 | return 0; |
@@ -238,7 +247,7 @@ void __init at91_aic_init(unsigned int priority[NR_AIC_IRQS]) | |||
238 | /* Active Low interrupt, with the specified priority */ | 247 | /* Active Low interrupt, with the specified priority */ |
239 | at91_aic_write(AT91_AIC_SMR(i), AT91_AIC_SRCTYPE_LOW | priority[i]); | 248 | at91_aic_write(AT91_AIC_SMR(i), AT91_AIC_SRCTYPE_LOW | priority[i]); |
240 | 249 | ||
241 | irq_set_chip_and_handler(i, &at91_aic_chip, handle_level_irq); | 250 | irq_set_chip_and_handler(i, &at91_aic_chip, handle_fasteoi_irq); |
242 | set_irq_flags(i, IRQF_VALID | IRQF_PROBE); | 251 | set_irq_flags(i, IRQF_VALID | IRQF_PROBE); |
243 | } | 252 | } |
244 | 253 | ||