aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Miao <eric.miao@canonical.com>2011-10-03 22:09:31 +0800
committerJohn Rigby <john.rigby@linaro.org>2011-10-12 10:01:50 -0600
commitefc2818322ecbfb8aa27573d6d396d76b05ad064 (patch)
tree3fe52987671d30ec4abcfd7d7c89d1c984aa701a
parentf55e76ad8764c61be97e5ec92fd4bef264f62f0a (diff)
mxc_i2c: fix i2c_probe() failure by using i2c_reset()
i2c_reset() is the better fit to be used in i2c_probe(), and it also fixes the bug of i2c_probe() failure on mx53loco with a MC34708 PMIC. Signed-off-by: Eric Miao <eric.miao@linaro.org>
-rw-r--r--drivers/i2c/mxc_i2c.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index ebde3c5ab..77369ec08 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -167,8 +167,7 @@ int i2c_probe(uchar chip)
{
int ret;
- writew(0, I2C_BASE + I2CR); /* Reset module */
- writew(I2CR_IEN, I2C_BASE + I2CR);
+ i2c_reset();
writew(I2CR_IEN | I2CR_MSTA | I2CR_MTX, I2C_BASE + I2CR);
ret = tx_byte(chip << 1);