diff options
Diffstat (limited to 'drivers/i2c')
| -rw-r--r-- | drivers/i2c/busses/i2c-aspeed.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c index c258c4d9a4c0..3d518e09369f 100644 --- a/drivers/i2c/busses/i2c-aspeed.c +++ b/drivers/i2c/busses/i2c-aspeed.c | |||
| @@ -552,6 +552,9 @@ static irqreturn_t aspeed_i2c_bus_irq(int irq, void *dev_id) | |||
| 552 | 552 | ||
| 553 | spin_lock(&bus->lock); | 553 | spin_lock(&bus->lock); |
| 554 | irq_received = readl(bus->base + ASPEED_I2C_INTR_STS_REG); | 554 | irq_received = readl(bus->base + ASPEED_I2C_INTR_STS_REG); |
| 555 | /* Ack all interrupts except for Rx done */ | ||
| 556 | writel(irq_received & ~ASPEED_I2CD_INTR_RX_DONE, | ||
| 557 | bus->base + ASPEED_I2C_INTR_STS_REG); | ||
| 555 | irq_remaining = irq_received; | 558 | irq_remaining = irq_received; |
| 556 | 559 | ||
| 557 | #if IS_ENABLED(CONFIG_I2C_SLAVE) | 560 | #if IS_ENABLED(CONFIG_I2C_SLAVE) |
| @@ -584,8 +587,10 @@ static irqreturn_t aspeed_i2c_bus_irq(int irq, void *dev_id) | |||
| 584 | "irq handled != irq. expected 0x%08x, but was 0x%08x\n", | 587 | "irq handled != irq. expected 0x%08x, but was 0x%08x\n", |
| 585 | irq_received, irq_handled); | 588 | irq_received, irq_handled); |
| 586 | 589 | ||
| 587 | /* Ack all interrupt bits. */ | 590 | /* Ack Rx done */ |
| 588 | writel(irq_received, bus->base + ASPEED_I2C_INTR_STS_REG); | 591 | if (irq_received & ASPEED_I2CD_INTR_RX_DONE) |
| 592 | writel(ASPEED_I2CD_INTR_RX_DONE, | ||
| 593 | bus->base + ASPEED_I2C_INTR_STS_REG); | ||
| 589 | spin_unlock(&bus->lock); | 594 | spin_unlock(&bus->lock); |
| 590 | return irq_remaining ? IRQ_NONE : IRQ_HANDLED; | 595 | return irq_remaining ? IRQ_NONE : IRQ_HANDLED; |
| 591 | } | 596 | } |
