8xx: i2c-algo-8xx - fixed timeout detection and transmission errors
Joakim Tjernlund
Joakim.Tjernlund at lumentis.se
Sun Aug 14 01:13:23 EST 2005
> My description seems to be a little misleading.
> WITHOUT the force_reinit() my SPI driver reports transmission errors if the
> I2C bus has longer disturbances.
> WITH the force_reinit() my SPI driver works fine.
> This sounds like the I2C allocates a new buffer for every timed-out
> transmision. If all I2C buffers are full, the SPI buffers get overwritten
> !?
> I did not really trace back the problem, this is only my suspicion.
> Because the force_reinit() resets all the buffer pointer to their init
> values the problem with the SPI does not occur.
>
> Cajus
I think the problem is that the CPM is still waiting on the SCL long after the timeout has happen.
A complete reinit will reset the I2C part of the CPM.
I think you should be able to get away with less, maybe it will enough to disable
I2C (i2c->i2c_i2mod &= ~1) and/or clear internal state (iip->iic_rstate = 0; iip->iic_tstate = 0;)
after a timeout?
Jocke
More information about the Linuxppc-embedded
mailing list