Skip to contentSkip to conversation

New interface to (old) JEDEC chips

DISCUSSION Edward A. Hildum 2 participants 2 messages Sep 19, 2001 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 4 lines · [email protected] 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