diff options
author | Eric Miao <eric.miao@canonical.com> | 2011-10-03 22:09:31 +0800 |
---|---|---|
committer | John Rigby <john.rigby@linaro.org> | 2011-10-12 10:01:50 -0600 |
commit | efc2818322ecbfb8aa27573d6d396d76b05ad064 (patch) | |
tree | 3fe52987671d30ec4abcfd7d7c89d1c984aa701a | |
parent | f55e76ad8764c61be97e5ec92fd4bef264f62f0a (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.c | 3 |
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); |