* 2 problems with the i2c-mpc.c driver
@ 2006-11-07 0:20 Joakim Tjernlund
0 siblings, 0 replies; only message in thread
From: Joakim Tjernlund @ 2006-11-07 0:20 UTC (permalink / raw)
To: linuxppc-dev
1) Master I2C address
Can't find how/where the controllers master I2C address is set.
Seems like it is inherited from whatever the boot(u-boot in this case)
was using. Seems a bit fragile to me.
2) Disturbance disables the I2C controller.
Noticed that a disturbance on the I2C bus sometimes disables the
the controller, will only recover after a reboot.
Adding the following seems to cure the problem:
static void mpc_i2c_start(struct mpc_i2c *i2c)
{
/* Clear arbitration */
writeb(0, i2c->base + MPC_I2C_SR);
+ writeccr(i2c, 0);
+ udelay(5);
/* Start with MEN */
writeccr(i2c, CCR_MEN);
}
I don't this this is the right fix, since it introduces an delay of 5 us.
Any ideas?
Jocke
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-11-07 0:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-07 0:20 2 problems with the i2c-mpc.c driver Joakim Tjernlund
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox