Skip to content

Commit

Permalink
arm: omap: irq: get rid of ifdef hack
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Balbi authored and Tony Lindgren committed Sep 11, 2014
1 parent 52b1e12 commit d6a7c5c
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions arch/arm/mach-omap2/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,24 +234,16 @@ static void __init omap_init_irq(u32 base, struct device_node *node)
static asmlinkage void __exception_irq_entry
omap_intc_handle_irq(struct pt_regs *regs)
{
u32 irqnr;
u32 irqnr = 0;
int handled_irq = 0;
int i;

do {
irqnr = intc_readl(INTC_PENDING_IRQ0);
if (irqnr)
goto out;

irqnr = intc_readl(INTC_PENDING_IRQ1);
if (irqnr)
goto out;

irqnr = intc_readl(INTC_PENDING_IRQ2);
#if IS_ENABLED(CONFIG_SOC_TI81XX) || IS_ENABLED(CONFIG_SOC_AM33XX)
if (irqnr)
goto out;
irqnr = intc_readl(INTC_PENDING_IRQ3);
#endif
for (i = 0; i < omap_nr_pending; i++) {
irqnr = intc_readl(INTC_PENDING_IRQ0 + (0x20 * i));
if (irqnr)
goto out;
}

out:
if (!irqnr)
Expand Down

0 comments on commit d6a7c5c

Please sign in to comment.