[COMMON] i2c: s3c: Add debugging log for Normal i2c
authorKyungwoo Kang <kwoo.kang@samsung.com>
Fri, 20 Oct 2017 07:14:34 +0000 (16:14 +0900)
committermyung-su.cha <myung-su.cha@samsung.com>
Thu, 10 May 2018 04:41:01 +0000 (13:41 +0900)
Previously we only print "bus idle" log when the bus is busy.
This patch we put I2C STAT SFR info for more convinient debugging.

Change-Id: I9b18366f7bdcdacfec0e7d0ae4b7cc4e26851e73
Signed-off-by: Kyungwoo Kang <kwoo.kang@samsung.com>
drivers/i2c/busses/i2c-s3c2410.c

index 9c8274c86981eff092f3b88bc685da483688673b..bba0e569aa4da0150705b34700ce24b732ad25ca 100644 (file)
@@ -759,7 +759,10 @@ static void s3c24xx_i2c_wait_idle(struct s3c24xx_i2c *i2c)
        }
 
        if (iicstat & S3C2410_IICSTAT_START) {
-               dev_warn(i2c->dev, "timeout waiting for bus idle\n");
+               dev_warn(i2c->dev, "timeout waiting for bus idle\n"
+                               "I2C Stat Reg dump:\n"
+                               "IIC STAT = 0x%08x\n"
+                               , readl(i2c->regs + S3C2410_IICSTAT));
                if (i2c->state != STATE_STOP)
                        s3c24xx_i2c_stop(i2c, -ENXIO);
        }