@@ -44,7 +44,7 @@
/* ----- global defines ----------------------------------------------- */
-#define DAVINCI_I2C_TIMEOUT (1*HZ)
+#define DAVINCI_I2C_TIMEOUT (2*HZ)
#define DAVINCI_I2C_MAX_TRIES 2
#define I2C_DAVINCI_INTR_ALL (DAVINCI_I2C_IMR_AAS | \
DAVINCI_I2C_IMR_SCD | \
@@ -282,7 +282,10 @@ static int i2c_davinci_wait_bus_not_busy(struct
davinci_i2c_dev *dev,
while (davinci_i2c_read_reg(dev, DAVINCI_I2C_STR_REG)
& DAVINCI_I2C_STR_BB) {
if (to_cnt <= DAVINCI_I2C_MAX_TRIES) {
- if (time_after(jiffies, timeout)) {
+ if (time_after(jiffies, timeout)
+ && (davinci_i2c_read_reg(dev,
+ DAVINCI_I2C_STR_REG)
+ & DAVINCI_I2C_STR_BB)) {
dev_warn(dev->dev,
"timeout waiting for bus ready\n");