From: "Joakim Tjernlund" <joakim.tjernlund@transmode.se>
To: <linuxppc-dev@ozlabs.org>
Subject: 2 problems with the i2c-mpc.c driver
Date: Tue, 7 Nov 2006 01:20:18 +0100 [thread overview]
Message-ID: <023a01c70202$818dea20$020120ac@Jocke> (raw)
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
reply other threads:[~2006-11-07 0:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='023a01c70202$818dea20$020120ac@Jocke' \
--to=joakim.tjernlund@transmode.se \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox