CHROMIUM: i2c-s3c2410: do not special case HDMIPHY stuck bus detection
authorDaniel Kurtz <djkurtz@chromium.org>
Mon, 20 Aug 2012 13:46:48 +0000 (21:46 +0800)
committerGerrit <chrome-bot@google.com>
Fri, 24 Aug 2012 02:18:38 +0000 (19:18 -0700)
Commit "i2c-s3c2410: Add HDMIPHY quirk for S3C2440" added support for
HDMIPHY with some special handling in s3c24xx_i2c_set_master:

"due to unknown reason (probably HW bug in HDMIPHY and/or the controller)
a transfer fails to finish. The controller hangs after sending the last
byte, the workaround for this bug is resetting the controller after each
transfer"

The "unknown reason" was that the proper sequence for generating a STOP
condition wasn't being followed as per the datasheet. Since this is now
fixed, remove the special handling.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chrome-os-partner:10089
TEST=No "s3c-i2c 12ce0000.i2c" error/warning messages in dmesg
TEST=HDMI output works
  1) EDID displayed in /var/log/Xorg.0.log
  2) Video shown on external monitor

Change-Id: I463f29c401d9cea37d081a0586c7ec2e71605631
Reviewed-on: https://gerrit.chromium.org/gerrit/29879
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
drivers/i2c/busses/i2c-s3c2410.c

index 54353af..6e675c6 100644 (file)
@@ -625,13 +625,6 @@ static int s3c24xx_i2c_set_master(struct s3c24xx_i2c *i2c)
        unsigned long iicstat;
        int timeout = 400;
 
-       /* the timeout for HDMIPHY is reduced to 10 ms because
-        * the hangup is expected to happen, so waiting 400 ms
-        * causes only unnecessary system hangup
-        */
-       if (i2c->quirks & QUIRK_HDMIPHY)
-               timeout = 10;
-
        while (timeout-- > 0) {
                iicstat = readl(i2c->regs + S3C2410_IICSTAT);
 
@@ -641,15 +634,6 @@ static int s3c24xx_i2c_set_master(struct s3c24xx_i2c *i2c)
                msleep(1);
        }
 
-       /* hang-up of bus dedicated for HDMIPHY occurred, resetting */
-       if (i2c->quirks & QUIRK_HDMIPHY) {
-               writel(0, i2c->regs + S3C2410_IICCON);
-               writel(0, i2c->regs + S3C2410_IICSTAT);
-               writel(0, i2c->regs + S3C2410_IICDS);
-
-               return 0;
-       }
-
        return -ETIMEDOUT;
 }