imx233/i2c: always reset the i2c block on timeout

On targets like stmp3700, resetting the dma channel on "soft" timeout
drives the whole block crazy unless it goes through complete reset.

Change-Id: I830b252279989bf9f9cd9c138240a6ea9b003527
This commit is contained in:
Amaury Pouly 2013-10-21 01:09:09 +02:00
parent efc591e42d
commit 6006eb59b1

View file

@ -205,6 +205,7 @@ enum imx233_i2c_error_t imx233_i2c_end(unsigned timeout)
if(semaphore_wait(&i2c_sema, timeout) == OBJ_WAIT_TIMEDOUT)
{
imx233_dma_reset_channel(APB_I2C);
imx233_i2c_reset();
ret = I2C_TIMEOUT;
}
else if(BF_RD(I2C_CTRL1, MASTER_LOSS_IRQ))