1
From db4c3d78b6dd75259990030056ea343f19e1f46e Mon Sep 17 00:00:00 2001
2
From: Riku Voipio <riku.voipio@nokia.com>
3
Date: Mon, 18 Feb 2013 16:58:27 +0000
4
Subject: [PATCH 23/70] omap_i2c: add support for underflowing
6
kernel workaround for OMAP3430 Errata 1.153 requires this..
8
hw/i2c/omap_i2c.c | 5 ++++-
9
1 file changed, 4 insertions(+), 1 deletion(-)
11
diff --git a/hw/i2c/omap_i2c.c b/hw/i2c/omap_i2c.c
12
index f048635..93e85d4 100644
13
--- a/hw/i2c/omap_i2c.c
14
+++ b/hw/i2c/omap_i2c.c
15
@@ -200,7 +200,10 @@ static uint32_t omap_i2c_read(void *opaque, hwaddr addr)
18
case 0x08: /* I2C_STAT */
19
- return s->stat | (i2c_bus_busy(s->bus) << 12);
20
+ ret = s->stat | (i2c_bus_busy(s->bus) << 12 );
21
+ if (s->revision >= OMAP3_INTR_REV && (s->stat & 0x4010)) /* XRDY or XDR */
22
+ s->stat |= 1 << 10; /* XUDF as required by errata 1.153 */
25
case 0x0c: /* I2C_IV / I2C_WE */
26
if (s->revision >= OMAP3_INTR_REV)