i2c-s3c2410: Fixup debug print of IICCON register
Subsystems (2)
PATCH 1/1 i2c-s3c2410: Fixup debug print of IICCON register
This patch is for debug print of the last IICCON register value applied by s3c24xx_i2c_clockrate function.
Signed-off-by Joonyoung Shim <[email protected]>
--- drivers/i2c/busses/i2c-s3c2410.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/i2c/busses/i2c-s3c2410.c +4 -4
@@ -611,7 +611,7 @@ static int s3c24xx_i2c_clockrate(struct s3c24xx_i2c *i2c, unsigned int *got)unsigned long clkin =clk_get_rate (i2c->clk);unsigned int divs, div1;unsigned long target_frequency; -u32 iiccon; +unsigned long iiccon;int freq; i2c->clkrate = clkin;
@@ -641,6 +641,7 @@ static int s3c24xx_i2c_clockrate(struct s3c24xx_i2c *i2c, unsigned int *got)if (div1 ==512 ) iiccon |=S3C2410_IICCON_TXDIV_512 ; +dev_dbg (i2c->dev,"IICCON=0x%02lx\n" , iiccon);writel (iiccon, i2c->regs +S3C2410_IICCON );if (s3c24xx_i2c_is2440 (i2c)) {
@@ -730,7 +731,7 @@ static inline void s3c24xx_i2c_deregister_cpufreq(struct s3c24xx_i2c *i2c)static int s3c24xx_i2c_init (struct s3c24xx_i2c *i2c) { -unsigned long iicon =S3C2410_IICCON_IRQEN |S3C2410_IICCON_ACKEN ; +unsigned long iiccon =S3C2410_IICCON_IRQEN |S3C2410_IICCON_ACKEN ;struct s3c2410_platform_i2c *pdata;unsigned int freq;
@@ -749,7 +750,7 @@ static int s3c24xx_i2c_init(struct s3c24xx_i2c *i2c)dev_info (i2c->dev,"slave address 0x%02x\n" , pdata->slave_addr); -writel (iicon, i2c->regs +S3C2410_IICCON ); +writel (iiccon, i2c->regs +S3C2410_IICCON );/* we need to work out the divisors for the clock... */
@@ -762,7 +763,6 @@ static int s3c24xx_i2c_init(struct s3c24xx_i2c *i2c)/* todo - check that the i2c lines aren't being dragged anywhere */ dev_info (i2c->dev,"bus frequency set to %d KHz\n" , freq); -dev_dbg (i2c->dev,"S3C2410_IICCON=0x%02lx\n" , iicon);return 0 ; }
Signature · 1 line
1.6.3.3