From 0fb8c196c5c915c2f77ca4a63232c96f069aa9c1 Mon Sep 17 00:00:00 2001 From: Hyunki Koo Date: Tue, 22 Jul 2014 22:37:21 +0900 Subject: [PATCH] i2c: s3c2410: set 24Mhz to NCLK for fimc_is_i2c Change-Id: I18b8cbcec5a6c8ac8a37235805323755210db6e2 Signed-off-by: Hyunki Koo --- drivers/i2c/busses/i2c-s3c2410.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 4e2821e1b429..e3bfbea0e97f 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -934,12 +934,17 @@ static int s3c24xx_i2c_calcdivisor(struct s3c24xx_i2c *i2c, static int s3c24xx_i2c_clockrate(struct s3c24xx_i2c *i2c, unsigned int *got) { struct s3c2410_platform_i2c *pdata = i2c->pdata; - unsigned long clkin = clk_get_rate(i2c->rate_clk); + unsigned long clkin; unsigned int divs, div1; unsigned long target_frequency; u32 iiccon; int freq; + if (i2c->quirks & QUIRK_FIMC_I2C) + clkin = 24000000;/* NCLK is fixed 24Mhz */ + else + clkin = clk_get_rate(i2c->rate_clk); + i2c->clkrate = clkin; clkin /= 1000; /* clkin now in KHz */ -- 2.20.1