From: Mike Ditto <mditto-Vjf7OWgA3BLqlBn2x/YWAg@public.gmane.org>
To: linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org,
Laurent Pinchart
<laurentp-BSmb2szPELAwsLKNixborgC/G2K4zDHf@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Erratic MPC8248 CPM2 I2C behaviour
Date: Mon, 01 Dec 2008 15:28:23 -0800 [thread overview]
Message-ID: <49347317.5080600@consentry.com> (raw)
In-Reply-To: <mailman.569.1227903153.29923.linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
Laurent Pinchart <laurentp-BSmb2szPELAwsLKNixborgC/G2K4zDHf@public.gmane.org> wrote:
> Transmission timeout after one second. The first TX buffer descriptor status
> hasn't been modified by the CPM. The CPM state dump shows that processing of
...
This sounds very similar to a problem I have seen on MPC8247 and
MPC8248.
It could be a variation of the CPM bug documented by Freescale as
erratum CPM98. But the key difference is that we see a persistent
failure, while the erratum only mentions a problem with "the next
transaction". What we see is that once the I2C engine gets confused
by some anomaly on the SCL signal, it stops processing buffer
descriptors entirely until it is turned off and back on. You can
observe this bug by momentarily grounding the SCL line (it's an
open-collector bus) with a jumper while you attempt an I/O.
Our production equipment is using Linux 2.6 with the out-of-tree
i2c-algo-8260.c by Dan Malek and Brad Parker. I modified this
driver to shut off the I2C controller and turn it back on when it
hits this problem, and now it can recover from this condition.
However, this does not explain how the controller gets into the
frozen state in the first place. We see it very rarely in production
units and have not been able to identify the cause. If it is
similar to erratum CPM98 then it could be noise on the SCL signal or
perhaps an I2C device that doesn't conform to the protocol perfectly.
Also beware, if you are using some kind of multiplexer, that you don't
direct the multiplexer to switch to a different bus (segment) while a
transaction is in progress.
In testing with the current (2.6.27) i2c-cpm.c driver, I found that
it is sufficient to #define I2C_CHIP_ERRATA to allow it to recover
from the CPM I2C freeze. However, I don't know if I like this
approach because it turns off the I2C engine after every transfer,
even successful ones, and I don't know if this will affect reliability
or performance. And I don't know if this will actually prevent the
freeze from happening, although I presume that it would protect the
I2C engine from getting confused by a glitch that happens while no
transfer is in progress.
I am not aware of any documentation for what exactly the I2C_CHIP_ERRATA
conditional code in i2c-cpm.c is meant to work around. The comment
mentions "earlier than rev D4" but I'm not aware of any such rev for
8260 or 8272 chip families, and if it is related to erratum CPM98,
Freescale seems to say that this erratum is in all revs of these chips
and has no plan to fix it, so it seems that the workaround should be
enabled by default.
-=] Mike [=-
next parent reply other threads:[~2008-12-01 23:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.569.1227903153.29923.linuxppc-dev@ozlabs.org>
[not found] ` <mailman.569.1227903153.29923.linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
2008-12-01 23:28 ` Mike Ditto [this message]
2008-12-02 8:39 ` Erratic MPC8248 CPM2 I2C behaviour Joakim Tjernlund
[not found] ` <1228207199.9867.69.camel-/EMGr9iCeazgSi9v3i4K4Pmbkio/vSLMs0AfqQuZ5sE@public.gmane.org>
2008-12-02 10:50 ` Laurent Pinchart
[not found] ` <200812021150.26233.laurentp-BSmb2szPELAwsLKNixborgC/G2K4zDHf@public.gmane.org>
2008-12-02 11:45 ` Joakim Tjernlund
2008-12-03 2:27 ` Mike Ditto
[not found] ` <49347317.5080600-Vjf7OWgA3BLqlBn2x/YWAg@public.gmane.org>
2008-12-02 11:07 ` Laurent Pinchart
[not found] ` <200812021207.06140.laurentp-BSmb2szPELAwsLKNixborgC/G2K4zDHf@public.gmane.org>
2008-12-03 1:44 ` Mike Ditto
2008-12-01 23:30 ` Mike Ditto
2008-12-02 0:51 ` Mike Ditto
[not found] <200811281724.49620.laurentp@cse-semaphore.com>
[not found] ` <20081129054153.GA22692@pengutronix.de>
[not found] ` <20081129054153.GA22692-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2008-12-01 9:56 ` Laurent Pinchart
[not found] ` <200811281724.49620.laurentp-BSmb2szPELAwsLKNixborgC/G2K4zDHf@public.gmane.org>
2008-12-04 15:37 ` Jochen Friedrich
2008-12-01 9:52 Laurent Pinchart
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=49347317.5080600@consentry.com \
--to=mditto-vjf7owga3blqlbn2x/ywag@public.gmane.org \
--cc=laurentp-BSmb2szPELAwsLKNixborgC/G2K4zDHf@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.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