From: 张晴 Date: Sat, 29 Sep 2012 06:56:23 +0000 (+0800) Subject: rk30:set i2c clk 200k in i2c_sram.c X-Git-Tag: firefly_0821_release~8499 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a00b8903eb8c402e7d6b4da7599c23b36f48c988;p=firefly-linux-kernel-4.4.55.git rk30:set i2c clk 200k in i2c_sram.c --- diff --git a/arch/arm/mach-rk30/i2c_sram.c b/arch/arm/mach-rk30/i2c_sram.c index 21537c85d301..e91ed63b66bf 100755 --- a/arch/arm/mach-rk30/i2c_sram.c +++ b/arch/arm/mach-rk30/i2c_sram.c @@ -143,8 +143,8 @@ void __sramfunc sram_i2c_init() data[2] = readl_relaxed(RK30_GRF_BASE + GRF_GPIO_IOMUX); writel_relaxed(data[2]| I2C_GRF_GPIO_IOMUX, RK30_GRF_BASE + GRF_GPIO_IOMUX); - div = rk30_ceil(24*1000*1000, I2C_SPEED*1000 * 8); - divh = divl = rk30_ceil(div, 2); + div = 0x1e; + divh = divl = 0xf; writel_relaxed(I2C_CLKDIV_VAL(divl, divh), SRAM_I2C_ADDRBASE + I2C_CLKDIV); data[3] = readl_relaxed(SRAM_I2C_ADDRBASE + I2C_CLKDIV);