From: Jamie Lokier <jamie@shareable.org>
To: "Jörn Engel" <joern@logfs.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: CFI-0002 NOR flash blocking CPU on status register reads
Date: Tue, 10 Jun 2008 14:52:30 +0100 [thread overview]
Message-ID: <20080610135229.GA31112@shareable.org> (raw)
In-Reply-To: <20080610130945.GB28565@shareable.org>
Jamie Lokier wrote:
> There's a wire from RY/BY# (ready/busy) on the flash to PB_IORDY on
> the CPU. That's "peripheral bus ready" - it causes I/O wait states
> when deasserted during an I/O cycle to the flash.
> does that mean this board shouldn't have wired RY/BY# on the
> Spansion flash to PB_IORDY on the CPU.
...
> But if I remove that wire, when the CPU is reset (e.g. by watchdog
> chip or other means), the flash might be in the middle of a write or
> erase operation.
...
> Won't the CPU read the initial boot instructions ... get
> programming status bytes...?
Oh, after reading the documentation more closely, I see the Spansion
chip has a reset signal, which aborts any write/erase operation
immediately, and it's safe to read CPU instructions then.
So I don't need the I/O wait states, and it looks like the board
designers should not have connected RY/BY# to PB_IORDY.
It is copied from a Sigma Designs reference design... I guess they
did it because their boot monitor's write/erase code does not poll the
status register correctly (checking for toggling DQ6), but simply
waits for the read byte to match what's written. That would cause
unreliable writing, and adding the wire would fix it.
Is that right?
Assuming so, my remaining problem (other than fixing their boot
monitor's flash code) is a few thousand boards which have the wire,
currently deployed.
The hard delay we patched in works, but assumes "typical erase time"
is enough, which may cease to be true as the chips age. Is that
expected? Should I use the max erase/write times instead?
(Oh, the joy of board mis-design workarounds!)
-- Jamie
next prev parent reply other threads:[~2008-06-10 13:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-10 13:09 CFI-0002 NOR flash blocking CPU on status register reads Jamie Lokier
2008-06-10 13:48 ` Holger Schurig
2008-06-10 13:59 ` Jamie Lokier
2008-06-10 13:52 ` Jamie Lokier [this message]
2008-06-10 17:18 ` Trent Piepho
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=20080610135229.GA31112@shareable.org \
--to=jamie@shareable.org \
--cc=joern@logfs.org \
--cc=linux-mtd@lists.infradead.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