提交 c8f925b6 编写于 作者: M Mika Westerberg 提交者: Grant Likely

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: NGrant Likely <grant.likely@secretlab.ca>
Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
上级 465f2bd4
......@@ -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 */
for (base = 0; base < lnw->chip.ngpio; base += 32) {
gedr = gpio_reg(&lnw->chip, base, GEDR);
pending = readl(gedr);
while (pending) {
while ((pending = readl(gedr))) {
gpio = __ffs(pending);
mask = BIT(gpio);
pending &= ~mask;
/* Clear before handling so we can't lose an edge */
writel(mask, gedr);
generic_handle_irq(irq_find_mapping(lnw->domain,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册