[U-Boot] [PATCH 1/2] rcar_i2c: Fix receiving wait condition

Nobuhiro Iwamatsu nobuhiro.iwamatsu.yj at renesas.com
Wed Dec 11 07:49:27 CET 2013


From: Hisashi Nakamura <hisashi.nakamura.ak at renesas.com>

Signed-off-by: Hisashi Nakamura <hisashi.nakamura.ak at renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj at renesas.com>
---
 drivers/i2c/rcar_i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/rcar_i2c.c b/drivers/i2c/rcar_i2c.c
index ba2cadb..01c98d4 100644
--- a/drivers/i2c/rcar_i2c.c
+++ b/drivers/i2c/rcar_i2c.c
@@ -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 */
-- 
1.8.5



More information about the U-Boot mailing list