Commit 8a9d97d3 authored by manjugk manjugk's avatar manjugk manjugk Committed by Ben Dooks

OMAP3: I2C: Clean up Errata 1p153 handling

Clean up existing Errata 1p153 handling to use generic
errata handling mechanism through dev flag.
Signed-off-by: default avatarManjunatha GK <manjugk@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
parent f3083d92
...@@ -168,6 +168,7 @@ enum { ...@@ -168,6 +168,7 @@ enum {
/* Errata definitions */ /* Errata definitions */
#define I2C_OMAP_ERRATA_I207 (1 << 0) #define I2C_OMAP_ERRATA_I207 (1 << 0)
#define I2C_OMAP3_1P153 (1 << 1)
struct omap_i2c_dev { struct omap_i2c_dev {
struct device *dev; struct device *dev;
...@@ -954,7 +955,7 @@ omap_i2c_isr(int this_irq, void *dev_id) ...@@ -954,7 +955,7 @@ omap_i2c_isr(int this_irq, void *dev_id)
break; break;
} }
if ((dev->rev <= OMAP_I2C_REV_ON_3430) && if ((dev->errata & I2C_OMAP3_1P153) &&
errata_omap3_1p153(dev, &stat, &err)) errata_omap3_1p153(dev, &stat, &err))
goto complete; goto complete;
...@@ -1057,6 +1058,9 @@ omap_i2c_probe(struct platform_device *pdev) ...@@ -1057,6 +1058,9 @@ omap_i2c_probe(struct platform_device *pdev)
dev->rev = omap_i2c_read_reg(dev, OMAP_I2C_REV_REG) & 0xff; dev->rev = omap_i2c_read_reg(dev, OMAP_I2C_REV_REG) & 0xff;
if (dev->rev <= OMAP_I2C_REV_ON_3430)
dev->errata |= I2C_OMAP3_1P153;
if (!(cpu_class_is_omap1() || cpu_is_omap2420())) { if (!(cpu_class_is_omap1() || cpu_is_omap2420())) {
u16 s; u16 s;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment