aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Miao <eric.miao@canonical.com>2011-10-03 22:09:31 +0800
committerEric Miao <eric.miao@canonical.com>2011-10-03 22:09:31 +0800
commitae245d901241e76d5d5213585c13fae522c768e9 (patch)
tree484f5e647ba42c214bbfe3cb450e09c7f34521ce
parent212bd07b46a8928a05b0dd0062a5c967a784d122 (diff)
downloadu-boot-linaro-ae245d901241e76d5d5213585c13fae522c768e9.tar.gz
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 ebde3c5..77369ec 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);