summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/rcar_i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/rcar_i2c.c')
-rw-r--r--drivers/i2c/rcar_i2c.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/i2c/rcar_i2c.c b/drivers/i2c/rcar_i2c.c
index ba2cadb17e..50cebd622b 100644
--- a/drivers/i2c/rcar_i2c.c
+++ b/drivers/i2c/rcar_i2c.c
@@ -119,11 +119,13 @@ rcar_i2c_raw_read(struct rcar_i2c *dev, u8 chip, uint addr)
/* set slave address, receive */
writel((chip << 1) | 1, &dev->icmar);
+ /* clear status */
+ writel(0, &dev->icmsr);
/* 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 */
OpenPOWER on IntegriCloud