From e7bed5c2b30c894666e43b68a3d7b8e8f91da50d Mon Sep 17 00:00:00 2001 From: Matthias Weisser Date: Mon, 24 Sep 2012 02:46:53 +0000 Subject: imx: Use MXC_I2C_CLK in imx i2c driver i2c didn't work on imx25 due to missing MXC_IPG_PERCLK. Now using MXC_I2C_CLK on all imx systems using i2c. Signed-off-by: Matthias Weisser Acked-by: Stefano Babic --- drivers/i2c/mxc_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index 73d89587019..18270b9de64 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -98,7 +98,7 @@ static uint8_t i2c_imx_get_clk(unsigned int rate) #endif /* Divider value calculation */ - i2c_clk_rate = mxc_get_clock(MXC_IPG_PERCLK); + i2c_clk_rate = mxc_get_clock(MXC_I2C_CLK); div = (i2c_clk_rate + rate - 1) / rate; if (div < i2c_clk_div[0][0]) clk_div = 0; @@ -142,7 +142,7 @@ unsigned int bus_i2c_get_bus_speed(void *base) for (clk_div = 0; i2c_clk_div[clk_div][1] != clk_idx; clk_div++) ; - return mxc_get_clock(MXC_IPG_PERCLK) / i2c_clk_div[clk_div][0]; + return mxc_get_clock(MXC_I2C_CLK) / i2c_clk_div[clk_div][0]; } #define ST_BUS_IDLE (0 | (I2SR_IBB << 8)) -- cgit v1.2.3