From: Eric Miao <eric.m...@canonical.com> 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.m...@linaro.org> --- 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 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); -- 1.7.4.1 _______________________________________________ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev