aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-omap.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 19f86e1eefa1..96814fb67155 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -312,15 +312,14 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
312 omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0); 312 omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
313 313
314 if (cpu_class_is_omap1()) { 314 if (cpu_class_is_omap1()) {
315 struct clk *armxor_ck; 315 /*
316 316 * The I2C functional clock is the armxor_ck, so there's
317 armxor_ck = clk_get(NULL, "armxor_ck"); 317 * no need to get "armxor_ck" separately. Now, if OMAP2420
318 if (IS_ERR(armxor_ck)) 318 * always returns 12MHz for the functional clock, we can
319 dev_warn(dev->dev, "Could not get armxor_ck\n"); 319 * do this bit unconditionally.
320 else { 320 */
321 fclk_rate = clk_get_rate(armxor_ck); 321 fclk_rate = clk_get_rate(dev->fclk);
322 clk_put(armxor_ck); 322
323 }
324 /* TRM for 5912 says the I2C clock must be prescaled to be 323 /* TRM for 5912 says the I2C clock must be prescaled to be
325 * between 7 - 12 MHz. The XOR input clock is typically 324 * between 7 - 12 MHz. The XOR input clock is typically
326 * 12, 13 or 19.2 MHz. So we should have code that produces: 325 * 12, 13 or 19.2 MHz. So we should have code that produces: