u-boot-brain/drivers/i2c
Marek Vasut 124913556c i2c: mxs_i2c: Squash endless loop
The endless waiting for a bit to be set can cause a hang, add a timeout
so we prevent such situation. A testcase for such a hang is below. The
testcase assumes a device to be present at address 0x50 and a device to
NOT be present at address 0x42 . Also note that the "sleep 1" induced
delays are imperative for this bug to manifest .

i2c read 0x42 0x0.2 0x10 0x42000000 ; sleep 1 ; \
i2c read 0x50 0x0.2 0x10 0x42000000 ; sleep 1 ; \
i2c read 0x42 0x0.2 0x10 0x42000000

The expected result of the above command is:

Error reading the chip.
Error reading the chip.

While without this patch, we observe a hang in the last read from 0x42
precisely when waiting for this bit to be set.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
2013-11-13 06:08:31 +01:00
..
bfin-twi_i2c.c Blackfin: TWI/I2C: implement multibus support 2010-05-05 10:04:38 +02:00
davinci_i2c.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
designware_i2c.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
designware_i2c.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
fsl_i2c.c fsl_i2c: add workaround for the erratum I2C A004447 2013-08-20 11:15:31 +02:00
fti2c010.c drivers/i2c: Update fti2c010.[ch], i2c_core.c to use SPDX identifiers 2013-07-25 08:51:42 -04:00
fti2c010.h drivers/i2c: Update fti2c010.[ch], i2c_core.c to use SPDX identifiers 2013-07-25 08:51:42 -04:00
i2c_core.c i2c: eliminate warnings in i2c_reloc_fixup function 2013-10-17 07:24:41 +02:00
Makefile i2c: sh_i2c: Update to new CONFIG_SYS_I2C framework 2013-11-13 06:08:26 +01:00
mv_i2c.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
mv_i2c.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
mvtwsi.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
mxc_i2c.c i2c: mxc: move to new subsystem 2013-10-17 07:20:24 +02:00
mxs_i2c.c i2c: mxs_i2c: Squash endless loop 2013-11-13 06:08:31 +01:00
omap24xx_i2c.c ARM: OMAP: I2C: New read, write and probe functions 2013-06-10 08:43:26 -04:00
omap24xx_i2c.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
omap1510_i2c.c Cleanup: fix "MHz" spelling 2008-10-21 11:25:39 +02:00
pca9564_i2c.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
ppc4xx_i2c.c Merge branch 'master' of git://git.denx.de/u-boot-i2c 2013-07-24 09:50:24 -04:00
rcar_i2c.c i2c: Add support for Renesas rcar 2013-10-17 07:20:25 +02:00
s3c24x0_i2c.c i2c: s3c24xx: add hsi2c controller support 2013-10-17 07:20:26 +02:00
s3c24x0_i2c.h i2c: s3c24xx: add hsi2c controller support 2013-10-17 07:20:26 +02:00
sh_i2c.c i2c: sh_i2c: Update to new CONFIG_SYS_I2C framework 2013-11-13 06:08:26 +01:00
sh_sh7734_i2c.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
soft_i2c.c i2c: soft: Fix typo in CONFIG_SYS_I2C_SOFT_SPEED 2013-08-03 06:01:18 +02:00
tegra_i2c.c tegra: Avoid using I2C prior to relocation 2013-08-13 17:11:25 -04:00
tsi108_i2c.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
u8500_i2c.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
u8500_i2c.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
zynq_i2c.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00