提交 84785f12 编写于 作者: M Manuel Lauss 提交者: Ben Dooks

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: NManuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: NBen Dooks <ben-linux@fluff.org>
上级 85ea2569
......@@ -101,7 +101,7 @@ static int wait_master_done(struct i2c_au1550_data *adap)
int i;
/* Wait for Master Done. */
for (i = 0; i < adap->xfer_timeout; i++) {
for (i = 0; i < 2 * adap->xfer_timeout; i++) {
if ((RD(adap, PSC_SMBEVNT) & PSC_SMBEVNT_MD) != 0)
return 0;
udelay(1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册