From: manjugk manjugk Date: Tue, 11 May 2010 18:35:23 +0000 (-0700) Subject: OMAP3: I2C: Clean up Errata 1p153 handling X-Git-Tag: v2.6.35-rc1~479^2~9 X-Git-Url: http://ftp.safe.ca/?p=safe%2Fjmp%2Flinux-2.6;a=commitdiff_plain;h=8a9d97d3a126fd33894e137f84ab47ec406df24f 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: Manjunatha GK Cc: Nishanth Menon Cc: Alexander Shishkin Signed-off-by: Tony Lindgren Signed-off-by: Ben Dooks --- diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index fdba131..7674efb 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -168,6 +168,7 @@ enum { /* Errata definitions */ #define I2C_OMAP_ERRATA_I207 (1 << 0) +#define I2C_OMAP3_1P153 (1 << 1) struct omap_i2c_dev { struct device *dev; @@ -954,7 +955,7 @@ complete: break; } - if ((dev->rev <= OMAP_I2C_REV_ON_3430) && + if ((dev->errata & I2C_OMAP3_1P153) && errata_omap3_1p153(dev, &stat, &err)) goto complete; @@ -1057,6 +1058,9 @@ omap_i2c_probe(struct platform_device *pdev) 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())) { u16 s;