i2c-eg20t: modified the setting of transfer rate.
authorToshiharu Okada <toshiharu-linux@dsn.okisemi.com>
Mon, 26 Sep 2011 07:16:23 +0000 (16:16 +0900)
committerBen Dooks <ben-linux@fluff.org>
Tue, 17 Jan 2012 23:28:18 +0000 (23:28 +0000)
This patch modified the setting value of
I2C Bus Transfer Rate Setting Counter regisrer.

Signed-off-by: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
drivers/i2c/busses/i2c-eg20t.c

index 8dc3f75..357a66c 100644 (file)
@@ -243,7 +243,7 @@ static void pch_i2c_init(struct i2c_algo_pch_data *adap)
        if (pch_clk > PCH_MAX_CLK)
                pch_clk = 62500;
 
-       pch_i2cbc = (pch_clk + (pch_i2c_speed * 4)) / pch_i2c_speed * 8;
+       pch_i2cbc = (pch_clk + (pch_i2c_speed * 4)) / (pch_i2c_speed * 8);
        /* Set transfer speed in I2CBC */
        iowrite32(pch_i2cbc, p + PCH_I2CBC);