From e41d2ba02b5a15fe2b370ba410faa7e292ba8bc0 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Wed, 25 Sep 2013 16:36:41 +0200 Subject: [PATCH] imx233: only clear got_a_nak on imx233, it doesn't exists on other stmps Change-Id: I88e369dd7fa289f054837b442983bb7c97a58c53 --- firmware/target/arm/imx233/i2c-imx233.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/firmware/target/arm/imx233/i2c-imx233.c b/firmware/target/arm/imx233/i2c-imx233.c index f3bdb48e89..57f0f7356a 100644 --- a/firmware/target/arm/imx233/i2c-imx233.c +++ b/firmware/target/arm/imx233/i2c-imx233.c @@ -212,7 +212,9 @@ enum imx233_i2c_error_t imx233_i2c_end(unsigned timeout) else if(BF_RD(I2C_CTRL1, NO_SLAVE_ACK_IRQ)) { /* the core doesn't like this error, this is a workaround to prevent lock up */ +#if IMX233_SUBTARGET >= 3780 BF_SET(I2C_CTRL1, CLR_GOT_A_NAK); +#endif imx233_dma_reset_channel(APB_I2C); imx233_i2c_reset(); ret = I2C_NO_SLAVE_ACK;