8xx: i2c-algo-8xx - fixed timeout detection and transmission errors

cajus.hahn at de.abb.com cajus.hahn at de.abb.com
Fri Aug 12 17:49:05 EST 2005





Hello Tjernlund, Hello Debora

>Try changing all
>  i2c->i2c_i2com |= 0x80;           /* Begin transmission */
>to
>  i2c->i2c_i2com |= 0x80 | 0x01;          /* Begin transmission */
>
>That should remove the need to do force_reinit(cpm) I hope.

This is NOT working in every case!

It will work, on short bus-disturbances on the SCL line.
I suggest adding the "| 0x01" even this will not help on every transmission
problem.

If you have longer disturbances on SCL or SDA, something in  the CPM will
prevent the I2C bus to continue working after the disturbances are gone.
Perhaps there is a problem with the buffer allocation.
I changed the i2c-algo-8xx.c to work with your patch and without the
force_reinit() code.
Then I set the SCL line to ground to simulate a longer bus disturbance.
After some timeouts my SPI bus, yes the SPI bus, reportet transmission
errors. Both bus-interfaces use the CPM. It looks like the SPI buffer gets
garbaged by the I2C interface.
With the force_reinit() this problem did not occur.

Cajus




More information about the Linuxppc-embedded mailing list