gpio/langwell: re-read the IRQ status register after each iteration
The IRQ status register should be re-read after each iteration. Otherwise the loop misses the interrupt if it gets raised immediately after handled. Reported-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
parent
465f2bd459
commit
c8f925b69f
@ -250,11 +250,9 @@ static void lnw_irq_handler(unsigned irq, struct irq_desc *desc)
|
|||||||
/* check GPIO controller to check which pin triggered the interrupt */
|
/* check GPIO controller to check which pin triggered the interrupt */
|
||||||
for (base = 0; base < lnw->chip.ngpio; base += 32) {
|
for (base = 0; base < lnw->chip.ngpio; base += 32) {
|
||||||
gedr = gpio_reg(&lnw->chip, base, GEDR);
|
gedr = gpio_reg(&lnw->chip, base, GEDR);
|
||||||
pending = readl(gedr);
|
while ((pending = readl(gedr))) {
|
||||||
while (pending) {
|
|
||||||
gpio = __ffs(pending);
|
gpio = __ffs(pending);
|
||||||
mask = BIT(gpio);
|
mask = BIT(gpio);
|
||||||
pending &= ~mask;
|
|
||||||
/* Clear before handling so we can't lose an edge */
|
/* Clear before handling so we can't lose an edge */
|
||||||
writel(mask, gedr);
|
writel(mask, gedr);
|
||||||
generic_handle_irq(irq_find_mapping(lnw->domain,
|
generic_handle_irq(irq_find_mapping(lnw->domain,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user