[uClinux-dev] Bug in drivers/mtd/chips/cfi_cmdset_0002.c for AMD flash chips writing

Markus Pietrek maillist at fsforth.de
Tue Mar 18 08:44:31 EST 2003


Hi folks,

I have located a timing issue on the cfi_cmdset_0002.c (uClinux-2.4.20). On 
the UNC20 (NetSilicon NS7520 based ARM with AM29LV641 CFI flash chips) 
writing data to an erased the flash ("cp xxx /dev/mtd/4) seemed to caused 
data corruption

---
# cp /nfs/linux2.bin /dev/mtd/4
Last is a0e7, datum is 5f4c
---

Actually the data was written well but the function 
cfi_cmdset_0002.c:do_write_oneword() is using an incorrect data polling 
algorithm and not the one suggested by AMD (according to the 
Am29LV640D/Am29LV641D manual, Publication#22366), producing timeouts (Instead 
of testing only bit#7 for busy/ready it compared the whole datum. But that is 
available only much later or after an unlock).

Perhaps someone can check the attached patch for cfi_cmdset_0002.c, fixing 
write and erase to use the recommended algorithm, and check it in into the 
uClinux CVS repository as I don't have any write accesses.

Best regards,


-- 
Markus Pietrek
FS Forth-Systeme GmbH
Phone: +49 (7667) 908 145,  FAX +49 (7667) 908 221

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_mtd
Type: text/x-diff
Size: 3785 bytes
Desc: not available
URL: <http://mailman.uclinux.org/pipermail/uclinux-dev/attachments/20030318/74795638/attachment.bin>


More information about the uClinux-dev mailing list