Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193176
b: refs/heads/master
c: e9f59b9
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Shishkin authored and Ben Dooks committed May 19, 2010
1 parent 8200631 commit fd36a0c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2dd151ab2792cd27a2268a6e4f3248193beed504
refs/heads/master: e9f59b9c9bc5730152b6a94c47dd90b730a07e35
10 changes: 9 additions & 1 deletion trunk/drivers/i2c/busses/i2c-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,17 +763,25 @@ omap_i2c_rev1_isr(int this_irq, void *dev_id)
*/
static int errata_omap3_1p153(struct omap_i2c_dev *dev, u16 *stat, int *err)
{
while (!(*stat & OMAP_I2C_STAT_XUDF)) {
unsigned long timeout = 10000;

while (--timeout && !(*stat & OMAP_I2C_STAT_XUDF)) {
if (*stat & (OMAP_I2C_STAT_NACK | OMAP_I2C_STAT_AL)) {
omap_i2c_ack_stat(dev, *stat & (OMAP_I2C_STAT_XRDY |
OMAP_I2C_STAT_XDR));
*err |= OMAP_I2C_STAT_XUDF;
return -ETIMEDOUT;
}

cpu_relax();
*stat = omap_i2c_read_reg(dev, OMAP_I2C_STAT_REG);
}

if (!timeout) {
dev_err(dev->dev, "timeout waiting on XUDF bit\n");
return 0;
}

return 0;
}

Expand Down

0 comments on commit fd36a0c

Please sign in to comment.