* New interface to (old) JEDEC chips
@ 2001-09-19 2:20 Edward A. Hildum
2001-09-19 21:28 ` David Woodhouse
0 siblings, 1 reply; 2+ messages in thread
From: Edward A. Hildum @ 2001-09-19 2:20 UTC (permalink / raw)
To: linux-mtd
Folks,
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: New interface to (old) JEDEC chips
2001-09-19 2:20 New interface to (old) JEDEC chips Edward A. Hildum
@ 2001-09-19 21:28 ` David Woodhouse
0 siblings, 0 replies; 2+ messages in thread
From: David Woodhouse @ 2001-09-19 21:28 UTC (permalink / raw)
To: Edward A. Hildum; +Cc: linux-mtd
ehildum@mail.arc.nasa.gov said:
> 1. I ran into a case where the code returned zeroes for both the
> manufacturer ID and the chip ID
> 2. The 'retried' variable is never incremented.
Your fix for both was correct. Stupid dwmw2. Thanks.
--
dwmw2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-09-19 21:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-19 2:20 New interface to (old) JEDEC chips Edward A. Hildum
2001-09-19 21:28 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox