summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/i2c-imx233.c
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-10-21 01:09:09 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2013-10-21 01:23:13 +0200
commit6006eb59b1064cdc115583d2eab3fe7bab4ffa4d (patch)
tree23f773852a3ecaa1c98c4263e61d7ff4bd16015e /firmware/target/arm/imx233/i2c-imx233.c
parentefc591e42d967c3324787f2ef4865055d6894565 (diff)
downloadrockbox-6006eb59b1064cdc115583d2eab3fe7bab4ffa4d.tar.gz
rockbox-6006eb59b1064cdc115583d2eab3fe7bab4ffa4d.tar.bz2
rockbox-6006eb59b1064cdc115583d2eab3fe7bab4ffa4d.zip
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
Diffstat (limited to 'firmware/target/arm/imx233/i2c-imx233.c')
-rw-r--r--firmware/target/arm/imx233/i2c-imx233.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/i2c-imx233.c b/firmware/target/arm/imx233/i2c-imx233.c
index 57f0f7356a..4d066a4152 100644
--- a/firmware/target/arm/imx233/i2c-imx233.c
+++ b/firmware/target/arm/imx233/i2c-imx233.c
@@ -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))