From: Shubhrajyoti D Date: Tue, 6 Dec 2011 18:25:58 +0000 (-0800) Subject: I2C: OMAP: fix FIFO usage for OMAP4 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1d5a34fe990c9e2e2f672b238ad881d0d4ed376b;p=mv-sheeva.git I2C: OMAP: fix FIFO usage for OMAP4 Currently the fifo depth is set to zero for OMAP4 which disables the FIFO usage. This patch enables the FIFO usage for I2C transactions on OMAP4 also. Tested on omap4430 and 3430. Tested-and-Reported-by: Nishanth Menon Signed-off-by: Shubhrajyoti D Signed-off-by: Kevin Hilman Signed-off-by: Ben Dooks --- diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index a43d0023446..fa23faa20f0 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -1047,13 +1047,14 @@ omap_i2c_probe(struct platform_device *pdev) * size. This is to ensure that we can handle the status on int * call back latencies. */ - if (dev->rev >= OMAP_I2C_REV_ON_3530_4430) { - dev->fifo_size = 0; + + dev->fifo_size = (dev->fifo_size / 2); + + if (dev->rev >= OMAP_I2C_REV_ON_3530_4430) dev->b_hw = 0; /* Disable hardware fixes */ - } else { - dev->fifo_size = (dev->fifo_size / 2); + else dev->b_hw = 1; /* Enable hardware fixes */ - } + /* calculate wakeup latency constraint for MPU */ if (dev->set_mpu_wkup_lat != NULL) dev->latency = (1000000 * dev->fifo_size) /