From: "Dan Wilson" <dwilson@dslextreme.com>
To: "Kumar Gala" <galak@kernel.crashing.org>
Cc: ppc list <linuxppc-embedded@ozlabs.org>
Subject: Re: MPC85xx i2c interface bug
Date: Tue, 06 Dec 2005 20:59:33 -0800 [thread overview]
Message-ID: <200512062059330484.282740E4@smtp.dslextreme.com> (raw)
In-Reply-To: <C7B817D4-457A-414A-BA2B-4A80DF0FA3E0@kernel.crashing.org>
On 12/6/2005 at 11:24 AM Kumar Gala wrote:
> Dan,
>
> I'm in agreement with your change for the 2.4 kernel. It looks like
> the 2.6 kernel driver is handing TXAK correctly. The following is a
> snippet from the 2.6 driver:
>
> if (length) {
> if (length == 1)
> writeccr(i2c, CCR_MIEN | CCR_MEN | CCR_MSTA
> | CCR_TXAK);
> else
> writeccr(i2c, CCR_MIEN | CCR_MEN | CCR_MSTA);
> /* Dummy read */
> readb(i2c->base + MPC_I2C_DR);
> }
>
> for (i = 0; i < length; i++) {
> if (i2c_wait(i2c, timeout, 0) < 0)
> return -1;
>
> /* Generate txack on next to last byte */
> if (i == length - 2)
> writeccr(i2c, CCR_MIEN | CCR_MEN | CCR_MSTA
> | CCR_TXAK);
> /* Generate stop on last byte */
> if (i == length - 1)
> writeccr(i2c, CCR_MIEN | CCR_MEN | CCR_TXAK);
> data[i] = readb(i2c->base + MPC_I2C_DR);
> }
>
>
> If I'm reading it correctly it matches your changes. If you dont
> mind looking at this and verifying that you agree that we are setting
> TXAK as expected.
>
> - kumar
>
Kumar,
Yes, the 2.6 code looks good to me too. Thanks much for your help!
Dan.
next prev parent reply other threads:[~2005-12-07 4:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-29 20:42 MPC85xx i2c interface bug dwilson
2005-11-30 6:14 ` Kumar Gala
2005-11-30 7:18 ` Dan Wilson
2005-12-06 17:24 ` Kumar Gala
2005-12-07 4:59 ` Dan Wilson [this message]
2005-12-03 17:22 ` Dan Wilson
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=200512062059330484.282740E4@smtp.dslextreme.com \
--to=dwilson@dslextreme.com \
--cc=galak@kernel.crashing.org \
--cc=linuxppc-embedded@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