i2c: s3c2410: set NCLK for FIMC_I2C
authorHyunki Koo <hyunki00.koo@samsung.com>
Mon, 3 Mar 2014 07:09:30 +0000 (16:09 +0900)
committermyung-su.cha <myung-su.cha@samsung.com>
Thu, 10 May 2018 04:40:48 +0000 (13:40 +0900)
Change-Id: I5d292d70e0f04a718086f870c788237b873ae455
Signed-off-by: Hyunki Koo <hyunki00.koo@samsung.com>
drivers/i2c/busses/i2c-s3c2410.c

index f18eea60e68c05919b1daf6e9359a0989f382dcb..80eb0fc634760f7e400194815ca330044a3ea860 100644 (file)
@@ -52,6 +52,7 @@ static LIST_HEAD(drvdata_list);
 #define S3C2410_IICADD                 0x08
 #define S3C2410_IICDS                  0x0C
 #define S3C2440_IICLC                  0x10
+#define S3C2440_CLK_BYPASS             0x14
 #define S3C2440_IICINT                 0x20
 #define S3C2440_IICNCLK_DIV2           0x28
 
@@ -896,6 +897,7 @@ static int s3c24xx_i2c_calcdivisor(struct s3c24xx_i2c *i2c,
        if (i2c->quirks & QUIRK_FIMC_I2C) {
                /* Input NCLK is used directly in i2c */
                writel(0, i2c->regs + S3C2440_IICNCLK_DIV2);
+               writeb(1, i2c->regs + S3C2440_CLK_BYPASS);
                clk_prescaler = 32;
        } else
                clk_prescaler = 16;