Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156085
b: refs/heads/master
c: cd086d3
h: refs/heads/master
i:
  156083: 9a4c546
v: v3
  • Loading branch information
Sonasath, Moiz authored and Ben Dooks committed Jul 30, 2009
1 parent 47a278e commit 9c0648a
Show file tree
Hide file tree
Showing 2 changed files with 24 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: 04c688dd7a65935568b44629bfaa122eddf76e94
refs/heads/master: cd086d3aa6f7f7bf4d4e1f9fa09af0f0b6bb99ec
24 changes: 23 additions & 1 deletion trunk/drivers/i2c/busses/i2c-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,9 +672,10 @@ omap_i2c_isr(int this_irq, void *dev_id)
break;
}

err = 0;
complete:
omap_i2c_write_reg(dev, OMAP_I2C_STAT_REG, stat);

err = 0;
if (stat & OMAP_I2C_STAT_NACK) {
err |= OMAP_I2C_STAT_NACK;
omap_i2c_write_reg(dev, OMAP_I2C_CON_REG,
Expand Down Expand Up @@ -764,6 +765,27 @@ omap_i2c_isr(int this_irq, void *dev_id)
"data to send\n");
break;
}

/*
* OMAP3430 Errata 1.153: When an XRDY/XDR
* is hit, wait for XUDF before writing data
* to DATA_REG. Otherwise some data bytes can
* be lost while transferring them from the
* memory to the I2C interface.
*/

if (cpu_is_omap34xx()) {
while (!(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;
goto complete;
}
cpu_relax();
stat = omap_i2c_read_reg(dev, OMAP_I2C_STAT_REG);
}
}

omap_i2c_write_reg(dev, OMAP_I2C_DATA_REG, w);
}
omap_i2c_ack_stat(dev,
Expand Down

0 comments on commit 9c0648a

Please sign in to comment.