aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-au1550.c
diff options
context:
space:
mode:
authorManuel Lauss <manuel.lauss@googlemail.com>2011-10-22 07:34:38 -0400
committerBen Dooks <ben-linux@fluff.org>2011-10-29 06:14:23 -0400
commit84785f120f4d64c5fa8cf4bab1cf07c2507d434f (patch)
treee6e57933666cd08ea6e81c0dc07ecf405868de82 /drivers/i2c/busses/i2c-au1550.c
parent85ea25698843d37b6f79927b2995644623fe1e06 (diff)
i2c-au1550: increase timeout waiting for master done
Double the timeout in the loop which busy-waits for the "master-done" bit to be set. This bit indicates whether an i2c transaction has completed; on the DB1300 and DB1550 boards this timeout is slightly too short and causes transactions to the WM8731 codec to be falsely flagged as failed. The timeout itself is necessary since transactions to non-existant slaves never set this bit in the first place (and cause i2cdetect to hang). With this change the WM8731 codec on the DB1300/DB1550 boards is correctly detected and initialized. Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-au1550.c')
-rw-r--r--drivers/i2c/busses/i2c-au1550.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-au1550.c b/drivers/i2c/busses/i2c-au1550.c
index 98ee11aa9e2c..4f5150c417a2 100644
--- a/drivers/i2c/busses/i2c-au1550.c
+++ b/drivers/i2c/busses/i2c-au1550.c
@@ -101,7 +101,7 @@ static int wait_master_done(struct i2c_au1550_data *adap)
101 int i; 101 int i;
102 102
103 /* Wait for Master Done. */ 103 /* Wait for Master Done. */
104 for (i = 0; i < adap->xfer_timeout; i++) { 104 for (i = 0; i < 2 * adap->xfer_timeout; i++) {
105 if ((RD(adap, PSC_SMBEVNT) & PSC_SMBEVNT_MD) != 0) 105 if ((RD(adap, PSC_SMBEVNT) & PSC_SMBEVNT_MD) != 0)
106 return 0; 106 return 0;
107 udelay(1); 107 udelay(1);