Skip to content

Commit 97491ba

Browse files
anarsoulBen Dooks
authored andcommitted
i2c-pxa2xx: Don't clear isr bits too early
isr is passed later into i2c_pxa_irq_txempty and i2c_pxa_irq_rxfull and they may use some other bits than irq sources. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
1 parent a0774f4 commit 97491ba

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎drivers/i2c/busses/i2c-pxa.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -966,8 +966,7 @@ static irqreturn_t i2c_pxa_handler(int this_irq, void *dev_id)
966966
struct pxa_i2c *i2c = dev_id;
967967
u32 isr = readl(_ISR(i2c));
968968

969-
isr &= VALID_INT_SOURCE;
970-
if (!isr)
969+
if (!(isr & VALID_INT_SOURCE))
971970
return IRQ_NONE;
972971

973972
if (i2c_debug > 2 && 0) {
@@ -984,7 +983,7 @@ static irqreturn_t i2c_pxa_handler(int this_irq, void *dev_id)
984983
/*
985984
* Always clear all pending IRQs.
986985
*/
987-
writel(isr, _ISR(i2c));
986+
writel(isr & VALID_INT_SOURCE, _ISR(i2c));
988987

989988
if (isr & ISR_SAD)
990989
i2c_pxa_slave_start(i2c, isr);

0 commit comments

Comments
 (0)