Commit 743daad9 authored by Ralph Walden's avatar Ralph Walden Committed by Tony Lindgren

[PATCH] ARM: OMAP: Add a loop to test for GPIO interrupts

On some OMAPs GPIO interrupts can be lost withouth this loop.
This patch was originally suggested by Ladislav Michl.
parent f2f9b0fc
...@@ -806,14 +806,15 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, ...@@ -806,14 +806,15 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc,
isr_reg = bank->base + OMAP24XX_GPIO_IRQSTATUS1; isr_reg = bank->base + OMAP24XX_GPIO_IRQSTATUS1;
#endif #endif
while(1) {
isr = __raw_readl((void __iomem *)isr_reg); isr = __raw_readl((void __iomem *)isr_reg);
_enable_gpio_irqbank(bank, isr, 0); _enable_gpio_irqbank(bank, isr, 0);
_clear_gpio_irqbank(bank, isr); _clear_gpio_irqbank(bank, isr);
_enable_gpio_irqbank(bank, isr, 1); _enable_gpio_irqbank(bank, isr, 1);
desc->chip->unmask(irq); desc->chip->unmask(irq);
if (unlikely(!isr)) if (!isr)
return; break;
gpio_irq = bank->virtual_irq_start; gpio_irq = bank->virtual_irq_start;
for (; isr != 0; isr >>= 1, gpio_irq++) { for (; isr != 0; isr >>= 1, gpio_irq++) {
...@@ -823,6 +824,7 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, ...@@ -823,6 +824,7 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc,
d = irq_desc + gpio_irq; d = irq_desc + gpio_irq;
d->handle(gpio_irq, d, regs); d->handle(gpio_irq, d, regs);
} }
}
} }
static void gpio_ack_irq(unsigned int irq) static void gpio_ack_irq(unsigned int irq)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment