diff options
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-designware.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c-designware.c index cb83671ff5fc..e6b1e6ece5d7 100644 --- a/drivers/i2c/busses/i2c-designware.c +++ b/drivers/i2c/busses/i2c-designware.c | |||
@@ -621,6 +621,13 @@ static irqreturn_t i2c_dw_isr(int this_irq, void *dev_id) | |||
621 | if (stat & DW_IC_INTR_TX_ABRT) { | 621 | if (stat & DW_IC_INTR_TX_ABRT) { |
622 | dev->cmd_err |= DW_IC_ERR_TX_ABRT; | 622 | dev->cmd_err |= DW_IC_ERR_TX_ABRT; |
623 | dev->status = STATUS_IDLE; | 623 | dev->status = STATUS_IDLE; |
624 | |||
625 | /* | ||
626 | * Anytime TX_ABRT is set, the contents of the tx/rx | ||
627 | * buffers are flushed. Make sure to skip them. | ||
628 | */ | ||
629 | writel(0, dev->base + DW_IC_INTR_MASK); | ||
630 | goto tx_aborted; | ||
624 | } | 631 | } |
625 | 632 | ||
626 | if (stat & DW_IC_INTR_RX_FULL) | 633 | if (stat & DW_IC_INTR_RX_FULL) |
@@ -635,6 +642,7 @@ static irqreturn_t i2c_dw_isr(int this_irq, void *dev_id) | |||
635 | * the current transmit status. | 642 | * the current transmit status. |
636 | */ | 643 | */ |
637 | 644 | ||
645 | tx_aborted: | ||
638 | if ((stat & (DW_IC_INTR_TX_ABRT | DW_IC_INTR_STOP_DET)) || dev->msg_err) | 646 | if ((stat & (DW_IC_INTR_TX_ABRT | DW_IC_INTR_STOP_DET)) || dev->msg_err) |
639 | complete(&dev->cmd_complete); | 647 | complete(&dev->cmd_complete); |
640 | 648 | ||