Skip to content

Commit

Permalink
i2c-pxa2xx: Don't clear isr bits too early
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vasily Khoruzhick authored and Ben Dooks committed Mar 21, 2011
1 parent a0774f4 commit 97491ba
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/i2c/busses/i2c-pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -966,8 +966,7 @@ static irqreturn_t i2c_pxa_handler(int this_irq, void *dev_id)
struct pxa_i2c *i2c = dev_id;
u32 isr = readl(_ISR(i2c));

isr &= VALID_INT_SOURCE;
if (!isr)
if (!(isr & VALID_INT_SOURCE))
return IRQ_NONE;

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

if (isr & ISR_SAD)
i2c_pxa_slave_start(i2c, isr);
Expand Down

0 comments on commit 97491ba

Please sign in to comment.