imx233: only clear got_a_nak on imx233, it doesn't exists on other stmps

Change-Id: I88e369dd7fa289f054837b442983bb7c97a58c53
This commit is contained in:
Amaury Pouly 2013-09-25 16:36:41 +02:00
parent 6ac481e8bc
commit e41d2ba02b

View file

@ -212,7 +212,9 @@ enum imx233_i2c_error_t imx233_i2c_end(unsigned timeout)
else if(BF_RD(I2C_CTRL1, NO_SLAVE_ACK_IRQ)) 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 */ /* 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); BF_SET(I2C_CTRL1, CLR_GOT_A_NAK);
#endif
imx233_dma_reset_channel(APB_I2C); imx233_dma_reset_channel(APB_I2C);
imx233_i2c_reset(); imx233_i2c_reset();
ret = I2C_NO_SLAVE_ACK; ret = I2C_NO_SLAVE_ACK;