rcar_i2c: Fix receiving wait condition
authorHisashi Nakamura <hisashi.nakamura.ak@renesas.com>
Wed, 11 Dec 2013 06:49:27 +0000 (15:49 +0900)
committerHeiko Schocher <hs@denx.de>
Mon, 13 Jan 2014 07:16:22 +0000 (08:16 +0100)
Signed-off-by: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
drivers/i2c/rcar_i2c.c

index ba2cadb17ecccb009bc5506f8f1a107745babcf8..01c98d4e16383e7554f0759d406c93d5e0c6174e 100644 (file)
@@ -122,8 +122,8 @@ rcar_i2c_raw_read(struct rcar_i2c *dev, u8 chip, uint addr)
        /* start master receive */
        writel(MCR_MDBS | MCR_MIE | MCR_ESG, &dev->icmcr);
 
-       while ((readl(&dev->icmsr) & (MSR_MAT | MSR_MDE))
-               != (MSR_MAT | MSR_MDE))
+       while ((readl(&dev->icmsr) & (MSR_MAT | MSR_MDR))
+               != (MSR_MAT | MSR_MDR))
                udelay(10);
 
        /* clear ESG */