From: Tony Lindgren Date: Fri, 23 Jan 2009 02:02:24 +0000 (-0800) Subject: Revert "i2c: i2c-omap: Fix standard and fast mode prescalers" X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=79d042a081d3e467c735bb0d9569ed6296f85a3c;p=linux-2.6-omap-h63xx.git Revert "i2c: i2c-omap: Fix standard and fast mode prescalers" This reverts commit d3282b387ddc630393d6158e8d6cffb7b1d8a42a. It breaks i2c on 2430 as noted by Kainan Cha. Signed-off-by: Tony Lindgren --- diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index c95368c3318..71b37ed4b72 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -337,13 +337,7 @@ static int omap_i2c_init(struct omap_i2c_dev *dev) if (cpu_is_omap2430() || cpu_is_omap34xx()) { /* HSI2C controller internal clk rate should be 19.2 Mhz */ - if (dev->speed > 400) - internal_clk = 19200; - else if (dev->speed > 100) - internal_clk = 9600; - else - internal_clk = 4000; - + internal_clk = 19200; fclk_rate = clk_get_rate(dev->fclk) / 1000; /* Compute prescaler divisor */ @@ -361,8 +355,8 @@ static int omap_i2c_init(struct omap_i2c_dev *dev) hssclh = fclk_rate / (dev->speed * 2) - 6; } else { /* To handle F/S modes */ - fsscll = internal_clk / (dev->speed * 2) - 3; - fssclh = internal_clk / (dev->speed * 2) - 9; + fsscll = internal_clk / (dev->speed * 2) - 6; + fssclh = internal_clk / (dev->speed * 2) - 6; } scll = (hsscll << OMAP_I2C_SCLL_HSSCLL) | fsscll; sclh = (hssclh << OMAP_I2C_SCLH_HSSCLH) | fssclh;