From e2efd7dc8465e002589c588cff038d9ea5d47a50 Mon Sep 17 00:00:00 2001 From: Kyungwoo Kang Date: Fri, 20 Oct 2017 16:14:34 +0900 Subject: [PATCH] [COMMON] i2c: s3c: Add debugging log for Normal i2c 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 --- drivers/i2c/busses/i2c-s3c2410.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 9c8274c86981..bba0e569aa4d 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -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); } -- 2.20.1