[U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

Joakim Tjernlund joakim.tjernlund at transmode.se
Wed Sep 9 11:19:40 CEST 2009


I wonder if this hides another problem too.
if the timeout hits, -1 is returned.

Then in i2c_read()/i2c_write() you have:
	if (i2c_wait4bus() >= 0
	    && i2c_write_addr(dev, I2C_WRITE_BIT, 0) != 0
	    && __i2c_write(&a[4 - alen], alen) == alen)
		i = 0; /* No error so far */
notice how the latter part, i2c_write_addr(dev, I2C_WRITE_BIT, 0) != 0
 && __i2c_write(&a[4 - alen], alen) == alen)
is ignored(never called) when i2c_wait4bus()  returns -1

 Jocke



More information about the U-Boot mailing list