Commit 0e9ae109 authored by Russell King's avatar Russell King Committed by Russell King

[ARM] omap: i2c: remove armxor_ck

On OMAP1, the I2C functional clock (fck) is the armxor_ck, so there's
no need to get "armxor_ck" separately.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 1d14de08
...@@ -312,15 +312,14 @@ static int omap_i2c_init(struct omap_i2c_dev *dev) ...@@ -312,15 +312,14 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0); omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
if (cpu_class_is_omap1()) { if (cpu_class_is_omap1()) {
struct clk *armxor_ck; /*
* The I2C functional clock is the armxor_ck, so there's
armxor_ck = clk_get(NULL, "armxor_ck"); * no need to get "armxor_ck" separately. Now, if OMAP2420
if (IS_ERR(armxor_ck)) * always returns 12MHz for the functional clock, we can
dev_warn(dev->dev, "Could not get armxor_ck\n"); * do this bit unconditionally.
else { */
fclk_rate = clk_get_rate(armxor_ck); fclk_rate = clk_get_rate(dev->fclk);
clk_put(armxor_ck);
}
/* TRM for 5912 says the I2C clock must be prescaled to be /* TRM for 5912 says the I2C clock must be prescaled to be
* between 7 - 12 MHz. The XOR input clock is typically * between 7 - 12 MHz. The XOR input clock is typically
* 12, 13 or 19.2 MHz. So we should have code that produces: * 12, 13 or 19.2 MHz. So we should have code that produces:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment