New interface to (old) JEDEC chips

Edward A. Hildum ehildum at
Tue Sep 18 22:20:27 EDT 2001

	I'm working on a 586 SBC with 2Megs of flash (AM29F016) mapped into a
window in the 0xD0000 area.  There is also some battery backed RAM mapped
nearby.  Dwmw2 suggested I check out the probe_jedec.c code for accessing
the flash.  Some comments:

In probe_jedec.c, jedec_probe_chip() :
1. I ran into a case where the code returned zeroes for both the
manufacturer ID and the chip ID (probably a bug in my low level driver).
The zeroes match the empty structure at the end of jedec_table[], so the
empty struct gets passed to cfi_jedec_init().  cfi_jedec_init() treats is
as a legit entry and happily builds some more structures.  In any case the
empty struct isn't needed (at least by jedec_probe_chip() ).  I deleted it
from my source.

2. The 'retried' variable is never incremented.  If we hit the " if
(!retried ) ... " clause, we can get an infinite loop which screws the
machine tight.  I've changed "if (!retried) ... " to "if (!retried++) ...".
 Should it only retry once?

More as I figure out what I'm doing.

Ted Hildum

More information about the linux-mtd mailing list