aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorJan Weitzel <j.weitzel@phytec.de>2011-12-07 11:50:16 -0800
committerZiyann <jaraidaniel@gmail.com>2014-10-01 12:57:43 +0200
commitb104285d3efdef8346ae85881d103fe03d4c0fab (patch)
treee3d1973afd0bf805618ff7564642a7fdc27f055d /drivers/i2c
parentd787a2c1804c554a57aa7bb721f9c8db0ebf3588 (diff)
downloadkernel_samsung_tuna-b104285d3efdef8346ae85881d103fe03d4c0fab.tar.gz
kernel_samsung_tuna-b104285d3efdef8346ae85881d103fe03d4c0fab.tar.bz2
kernel_samsung_tuna-b104285d3efdef8346ae85881d103fe03d4c0fab.zip
I2C: OMAP: NACK without STP
On OMAP4 OMAP_I2C_STAT_NACK is causing a timeout on the next access. The isr cleans all flags in OMAP_I2C_CON_REG by setting OMAP_I2C_CON_STP OMAP_I2C_CON_STP is also set in omap_i2c_xfer_msg on the last message. According to the TI TSR the sequence for OMAP_I2C_STAT_NACK and OMAP_I2C_STAT_AL are nearly the same. Removing the OMAP_I2C_CON_STP part in the isr fix the problem. Tested on OMAP4430 and OMAP3530 (here NACK was not a problem) Fixes also booting on 2430sdp. [Picked from http://patches.linaro.org/1899/] Change-Id: I9bdeba8853ced27659770ad9390bd1b4be573155 Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-omap.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 0088b8cddd1..125013778f6 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -894,11 +894,9 @@ complete:
~(OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR |
OMAP_I2C_STAT_XRDY | OMAP_I2C_STAT_XDR));
- if (stat & OMAP_I2C_STAT_NACK) {
+ if (stat & OMAP_I2C_STAT_NACK)
err |= OMAP_I2C_STAT_NACK;
- omap_i2c_write_reg(dev, OMAP_I2C_CON_REG,
- OMAP_I2C_CON_STP);
- }
+
if (stat & OMAP_I2C_STAT_AL) {
dev_err(dev->dev, "Arbitration lost\n");
err |= OMAP_I2C_STAT_AL;