From fd0b4c86320e1de38fe76c861e219f123467c533 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Fri, 6 Nov 2009 21:48:33 +0900 Subject: [PATCH] --- yaml --- r: 173855 b: refs/heads/master c: 21a89d4101ce338c2872401c82b66a7c155e24ab h: refs/heads/master i: 173853: 89f5a205287322e73f67b9dbf714ffa90d3d625f 173851: 540c72a02e6f89b532e1120508b024893d5dd9dd 173847: bc9a45e73156046b9c127edf92a06da2477743c5 173839: 45a27ba6490abc39f1430319b24dc749a5cfbca6 173823: 1b9ddb2b692d0cfef0d631f8954afba3b17301eb v: v3 --- [refs] | 2 +- trunk/drivers/i2c/busses/i2c-designware.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index a79803a0d656..adb3cc26d692 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4cb6d1d6da471d795320cc4a933ce60f415dd1f6 +refs/heads/master: 21a89d4101ce338c2872401c82b66a7c155e24ab diff --git a/trunk/drivers/i2c/busses/i2c-designware.c b/trunk/drivers/i2c/busses/i2c-designware.c index 0eea0dd35895..940bbf31bc8c 100644 --- a/trunk/drivers/i2c/busses/i2c-designware.c +++ b/trunk/drivers/i2c/busses/i2c-designware.c @@ -342,7 +342,7 @@ i2c_dw_xfer_msg(struct dw_i2c_dev *dev) u32 addr = msgs[dev->msg_write_idx].addr; u32 buf_len = dev->tx_buf_len; - intr_mask = DW_IC_INTR_STOP_DET | DW_IC_INTR_TX_ABRT; + intr_mask = DW_IC_INTR_STOP_DET | DW_IC_INTR_TX_ABRT | DW_IC_INTR_RX_FULL; if (!(dev->status & STATUS_WRITE_IN_PROGRESS)) { /* Disable the adapter */ @@ -593,10 +593,11 @@ static irqreturn_t i2c_dw_isr(int this_irq, void *dev_id) dev->status = STATUS_IDLE; } - if (stat & DW_IC_INTR_TX_EMPTY) { + if (stat & DW_IC_INTR_RX_FULL) i2c_dw_read(dev); + + if (stat & DW_IC_INTR_TX_EMPTY) i2c_dw_xfer_msg(dev); - } /* * No need to modify or disable the interrupt mask here.