From: David Hawkins <dwh@ovro.caltech.edu>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Freescale MPC8349EMDS hang on boot
Date: Fri, 18 Jul 2008 18:52:00 -0700 [thread overview]
Message-ID: <488148C0.6000901@ovro.caltech.edu> (raw)
In-Reply-To: <4880F5C4.8060009@ge.com>
Hi guys,
As noted in Ira's previous posts, he'd managed to get the
MPC8349E and MPC8349EA boards to fail consistently.
Starting with the U-Boot head, and applying Ira's minimal
BCSR access plus linker 32-byte alignment patch, we used a
BDI2000 to set break-points until we identified the flash
address at which the board died. The BDI could break
consistently at FE00_9B90, but stepping past that point
would result in failure.
FE00_9B90 is in the drivers/i2c/fsl_i2c.c code, which
explains why Ira would see the 'I2C: ' line before lockup.
I put a logic analyzer on the local bus and triggered
at the access to FE00_9B90, and found something weird ...
Right before the access to FE00_9B90 was a *write* to
FE03_03C8. This location is in the .data section, but
in *read-only* Flash.
The data following that write is then *not* the same as
the data shown in the ELF file (or binary file written
to flash).
My hypothesis is that this write-access to the flash triggers
an undocumented Flash command code, that causes further reads
from the Flash to return manufacturer data *not code*. Hence,
following the write to Flash, the processor loads garbage
instructions and goes off into nowhere land.
Ira's alignment patch to the linker code causes the
write-address to change, so I suspect that the address for
the Flash write was critical in triggering the Flash code.
The offending write shown in the logic analyzer trace was
the value 0005_FE99 to address FE03_03C8, which results
in 16-bits writes of 0005 then FE99 to address FE03_03C8
and FE03_03CA.
On the MPC8349E board, which uses Micron Q-Flash, the Flash
reads after this write return 0, while on the MPC8349EA board,
which uses Spansion Flash, the reads return non-zero data, but
still invalid data.
We tried writing the offending command code to Flash and
then reading from FE00_9B90 to see if we could reproduce
what the logic analyzer shows. However, we could not reproduce
the problem; the write waveforms would match, but the
reads returned valid Flash data. So, its a pretty subtle
Flash command code sequence!
How's that for a 'trial by fire'?!
The offending line that produces the write to Flash, involves
the use of a
static unsigned int i2c_bus_speed[2]
on line 48 of drivers/i2c/fsl_i2c.c, which is written to in
the function i2c_init(). This code is running from Flash still,
so there should be no writes to .data section code.
git log d8c82db4
shows Timur added this code. So, Timur, you owe Ira a
beer for the stress this change caused :)
We haven't looked into the intent of the I2C speed tracking
variable, so can't provide a patch. However, I'm sure Timur
will come up with a nice solution.
Thanks for all the valuable feedback everyone supplied to Ira.
Kudos to Ira for debugging this issue.
Cheers,
Dave Hawkins.
next prev parent reply other threads:[~2008-07-19 1:52 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-16 22:28 [U-Boot-Users] Freescale MPC8349EMDS hang on boot Ira Snyder
2008-07-17 21:54 ` Kim Phillips
2008-07-17 22:50 ` Ira Snyder
2008-07-18 11:59 ` Jerry Van Baren
2008-07-18 17:28 ` Ira Snyder
2008-07-18 18:17 ` Jerry Van Baren
2008-07-18 19:24 ` Ira Snyder
2008-07-18 19:57 ` Jerry Van Baren
2008-07-19 1:52 ` David Hawkins [this message]
2008-07-19 5:32 ` Timur Tabi
2008-07-19 17:17 ` David Hawkins
2008-07-19 17:49 ` [U-Boot-Users] RFQ: disable flash writes until after relocation? David Hawkins
2008-07-20 20:07 ` Wolfgang Denk
2008-07-21 15:48 ` Timur Tabi
2008-07-21 17:46 ` David Hawkins
2008-07-21 18:43 ` Timur Tabi
2008-07-21 18:33 ` Wolfgang Denk
2008-07-21 17:22 ` David Hawkins
2008-07-21 11:58 ` Jerry Van Baren
2008-07-21 17:36 ` David Hawkins
2008-07-21 17:56 ` Jerry Van Baren
2008-07-21 18:45 ` David Hawkins
2008-07-22 23:14 ` [U-Boot-Users] Freescale MPC8349EMDS BCSR corruption David Hawkins
2008-07-23 6:16 ` Dave Liu
2008-07-23 6:34 ` Dave Liu
2008-07-23 17:25 ` Ira Snyder
2008-07-29 1:36 ` David Hawkins
2008-07-29 3:42 ` David Hawkins
2008-10-08 3:50 ` [U-Boot] " David Hawkins
2008-10-09 5:46 ` Liu Dave-R63238
2008-07-17 23:18 ` [U-Boot-Users] Freescale MPC8349EMDS hang on boot Ira Snyder
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=488148C0.6000901@ovro.caltech.edu \
--to=dwh@ovro.caltech.edu \
--cc=u-boot@lists.denx.de \
/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