diff options
author | manjugk manjugk <manjugk@ti.com> | 2010-05-11 14:35:23 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-05-19 19:19:00 -0400 |
commit | 8a9d97d3a126fd33894e137f84ab47ec406df24f (patch) | |
tree | 66b679a9289ddb2127577feca97cdf1a1d08cca3 /drivers | |
parent | f3083d921d8964b66502a0456f62a9d29cd029ef (diff) |
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 <manjugk@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/busses/i2c-omap.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index fdba13137daf..7674efb55378 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c | |||
@@ -168,6 +168,7 @@ enum { | |||
168 | 168 | ||
169 | /* Errata definitions */ | 169 | /* Errata definitions */ |
170 | #define I2C_OMAP_ERRATA_I207 (1 << 0) | 170 | #define I2C_OMAP_ERRATA_I207 (1 << 0) |
171 | #define I2C_OMAP3_1P153 (1 << 1) | ||
171 | 172 | ||
172 | struct omap_i2c_dev { | 173 | struct omap_i2c_dev { |
173 | struct device *dev; | 174 | struct device *dev; |
@@ -954,7 +955,7 @@ complete: | |||
954 | break; | 955 | break; |
955 | } | 956 | } |
956 | 957 | ||
957 | if ((dev->rev <= OMAP_I2C_REV_ON_3430) && | 958 | if ((dev->errata & I2C_OMAP3_1P153) && |
958 | errata_omap3_1p153(dev, &stat, &err)) | 959 | errata_omap3_1p153(dev, &stat, &err)) |
959 | goto complete; | 960 | goto complete; |
960 | 961 | ||
@@ -1057,6 +1058,9 @@ omap_i2c_probe(struct platform_device *pdev) | |||
1057 | 1058 | ||
1058 | dev->rev = omap_i2c_read_reg(dev, OMAP_I2C_REV_REG) & 0xff; | 1059 | dev->rev = omap_i2c_read_reg(dev, OMAP_I2C_REV_REG) & 0xff; |
1059 | 1060 | ||
1061 | if (dev->rev <= OMAP_I2C_REV_ON_3430) | ||
1062 | dev->errata |= I2C_OMAP3_1P153; | ||
1063 | |||
1060 | if (!(cpu_class_is_omap1() || cpu_is_omap2420())) { | 1064 | if (!(cpu_class_is_omap1() || cpu_is_omap2420())) { |
1061 | u16 s; | 1065 | u16 s; |
1062 | 1066 | ||