aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/irq.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-09-08 20:54:57 -0400
committerTony Lindgren <tony@atomide.com>2014-09-11 16:05:49 -0400
commitd6a7c5c84f5ddab54717914ad293ed9d99d644ff (patch)
tree7c22de102bddd3607282a07f859d346ca1e47381 /arch/arm/mach-omap2/irq.c
parent52b1e1291334d79bb3d2fcaec15f7fc42eedbd83 (diff)
arm: omap: irq: get rid of ifdef hack
we don't need the ifdef if we have omap_nr_pending telling us how many pending registers we have on current platform. This solves a possible problem where we could try to handle bogus interrupts on OMAP2 and OMAP3 if using single zImage kernel, because we would end up reading the following pending FIQ register. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/irq.c')
-rw-r--r--arch/arm/mach-omap2/irq.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 583a1c7de855..43785ee27840 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -234,24 +234,16 @@ static void __init omap_init_irq(u32 base, struct device_node *node)
234static asmlinkage void __exception_irq_entry 234static asmlinkage void __exception_irq_entry
235omap_intc_handle_irq(struct pt_regs *regs) 235omap_intc_handle_irq(struct pt_regs *regs)
236{ 236{
237 u32 irqnr; 237 u32 irqnr = 0;
238 int handled_irq = 0; 238 int handled_irq = 0;
239 int i;
239 240
240 do { 241 do {
241 irqnr = intc_readl(INTC_PENDING_IRQ0); 242 for (i = 0; i < omap_nr_pending; i++) {
242 if (irqnr) 243 irqnr = intc_readl(INTC_PENDING_IRQ0 + (0x20 * i));
243 goto out; 244 if (irqnr)
244 245 goto out;
245 irqnr = intc_readl(INTC_PENDING_IRQ1); 246 }
246 if (irqnr)
247 goto out;
248
249 irqnr = intc_readl(INTC_PENDING_IRQ2);
250#if IS_ENABLED(CONFIG_SOC_TI81XX) || IS_ENABLED(CONFIG_SOC_AM33XX)
251 if (irqnr)
252 goto out;
253 irqnr = intc_readl(INTC_PENDING_IRQ3);
254#endif
255 247
256out: 248out:
257 if (!irqnr) 249 if (!irqnr)