[RAMEN9610-13087][COMMON] i2c: s3c2410: Add IICCON SFR dump for debug
authorKyungwoo Kang <kwoo.kang@samsung.com>
Mon, 11 Mar 2019 05:02:27 +0000 (14:02 +0900)
committerlulu2 <lulu2@lenovo.com>
Mon, 18 Mar 2019 06:47:44 +0000 (14:47 +0800)
Change-Id: Iabbde5e3601a6f7d605b5859e30ebc34322f0062
Signed-off-by: Kyungwoo Kang <kwoo.kang@samsung.com>
drivers/i2c/busses/i2c-s3c2410.c

index 2a6f3f23a072429690129f8f36fdf678f5b76e62..b002cf8eabcf529c2cfc301ca6e9b7f01b6f3798 100644 (file)
@@ -802,7 +802,13 @@ static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c,
                ret = i2c->msg_idx;
 
                if (ret != num)
-                       dev_dbg(i2c->dev, "incomplete xfer (%d)\n", ret);
+                       dev_err(i2c->dev, "QUIRK_POLL incomplete xfer (%d)\n"
+                               "I2C Stat Reg dump:\n"
+                               "IIC STAT = 0x%08x\n"
+                               "IIC CON = 0x%08x\n"
+                               , ret
+                               , readl(i2c->regs + S3C2410_IICSTAT)
+                               , readl(i2c->regs + S3C2410_IICCON));
 
                goto out;
        }
@@ -817,7 +823,13 @@ static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c,
        if (timeout == 0)
                dev_err(i2c->dev, "timeout\n");
        else if (ret != num)
-               dev_err(i2c->dev, "incomplete xfer (%d)\n", ret);
+               dev_err(i2c->dev, "incomplete xfer (%d)\n"
+                               "I2C Stat Reg dump:\n"
+                               "IIC STAT = 0x%08x\n"
+                               "IIC CON = 0x%08x\n"
+                               , ret
+                               , readl(i2c->regs + S3C2410_IICSTAT)
+                               , readl(i2c->regs + S3C2410_IICCON));
 
        /* For QUIRK_HDMIPHY, bus is already disabled */
        if (i2c->quirks & QUIRK_HDMIPHY)