diff options
author | Gregory CLEMENT <gregory.clement@free-electrons.com> | 2013-01-25 12:32:41 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2013-02-28 12:57:07 -0500 |
commit | 3a6f08a3708f6faf6aba4abbdeaa9da29393f696 (patch) | |
tree | b6f4d2624eb4d4004682a426df87d942c6ced183 | |
parent | 9b75ac0cbf11199c4d125e68c3b86ae7d0ee941f (diff) |
arm: mvebu: Add support for local interrupt
MPIC allows the use of private interrupt for each CPUs. The 28th first
interrupts are per-cpu. This patch adds support to use them.
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r-- | arch/arm/mach-mvebu/irq-armada-370-xp.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/arch/arm/mach-mvebu/irq-armada-370-xp.c b/arch/arm/mach-mvebu/irq-armada-370-xp.c index f99a4a2a250d..274ff58271de 100644 --- a/arch/arm/mach-mvebu/irq-armada-370-xp.c +++ b/arch/arm/mach-mvebu/irq-armada-370-xp.c | |||
@@ -145,10 +145,17 @@ static int armada_370_xp_mpic_irq_map(struct irq_domain *h, | |||
145 | { | 145 | { |
146 | armada_370_xp_irq_mask(irq_get_irq_data(virq)); | 146 | armada_370_xp_irq_mask(irq_get_irq_data(virq)); |
147 | writel(hw, main_int_base + ARMADA_370_XP_INT_SET_ENABLE_OFFS); | 147 | writel(hw, main_int_base + ARMADA_370_XP_INT_SET_ENABLE_OFFS); |
148 | |||
149 | irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip, | ||
150 | handle_level_irq); | ||
151 | irq_set_status_flags(virq, IRQ_LEVEL); | 148 | irq_set_status_flags(virq, IRQ_LEVEL); |
149 | |||
150 | if (hw < ARMADA_370_XP_MAX_PER_CPU_IRQS) { | ||
151 | irq_set_percpu_devid(virq); | ||
152 | irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip, | ||
153 | handle_percpu_devid_irq); | ||
154 | |||
155 | } else { | ||
156 | irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip, | ||
157 | handle_level_irq); | ||
158 | } | ||
152 | set_irq_flags(virq, IRQF_VALID | IRQF_PROBE); | 159 | set_irq_flags(virq, IRQF_VALID | IRQF_PROBE); |
153 | 160 | ||
154 | return 0; | 161 | return 0; |
@@ -245,7 +252,7 @@ asmlinkage void __exception_irq_entry armada_370_xp_handle_irq(struct pt_regs | |||
245 | if (irqnr > 1022) | 252 | if (irqnr > 1022) |
246 | break; | 253 | break; |
247 | 254 | ||
248 | if (irqnr >= 8) { | 255 | if (irqnr > 0) { |
249 | irqnr = irq_find_mapping(armada_370_xp_mpic_domain, | 256 | irqnr = irq_find_mapping(armada_370_xp_mpic_domain, |
250 | irqnr); | 257 | irqnr); |
251 | handle_IRQ(irqnr, regs); | 258 | handle_IRQ(irqnr, regs); |