Erasebug on AMD flashes
Hi list!
we are using jffs2 on the dbox2 and AMD flash chips, but since rev. 1.96 of cfi_cmdset_0002.c we can't erase the flashes. rev. 1.94 works without problems.
here are some debug infos, tell me if you need more!
when we want to erase the flashes with MEMERASE ioctl, we get these errors:
Erase at 0x00080000 failed immediately: errno -5 MTD do_erase_oneblock(): flash internal timeout Erase at 0x00060000 failed immediately: errno -5 MTD do_erase_oneblock(): flash internal timeout Erase at 0x00040000 failed immediately: errno -5 MTD do_erase_oneblock(): flash internal timeout Erase at 0x00020000 failed immediately: errno -5 MTD do_erase_oneblock(): flash internal timeout Erase at 0x00000000 failed immediately: errno -5 MTD do_erase_oneblock(): flash internal timeout Erase at 0x000c0000 failed immediately: errno -5 MTD do_erase_oneblock(): flash internal timeout
when we do erase with "eraseall" binary:
eraseall: /dev/mtd/3: MTD Erase failure: Input/output error Erasing 128 Kibyte @ 20000 -- 14 % complete.MTD do_erase_oneblock(): flash inter
nal timeout
eraseall: /dev/mtd/3: MTD Erase failure: Input/output error Erasing 128 Kibyte @ 40000 -- 28 % complete.MTD do_erase_oneblock(): flash inter
nal timeout
eraseall: /dev/mtd/3: MTD Erase failure: Input/output error Erasing 128 Kibyte @ 60000 -- 42 % complete.MTD do_erase_oneblock(): flash inter
nal timeout
eraseall: /dev/mtd/3: MTD Erase failure: Input/output error Erasing 128 Kibyte @ 80000 -- 57 % complete.MTD do_erase_oneblock(): flash inter
nal timeout
eraseall: /dev/mtd/3: MTD Erase failure: Input/output error Erasing 128 Kibyte @ a0000 -- 71 % complete.MTD do_erase_oneblock(): flash inter
nal timeout
eraseall: /dev/mtd/3: MTD Erase failure: Input/output error Erasing 128 Kibyte @ c0000 -- 85 % complete.MTD do_erase_oneblock(): flash inter
nal timeout
would be please if anybody can take a look over the code or revert revision of cfi_cmdset_0002.c to 1.94.
thx!
greets dkey
Quoted 10 lines · dkey
Quoted 1 line
we are using jffs2 on the dbox2 and AMD flash chips, but since rev. 1.96 of
cfi_cmdset_0002.cwe can't erase the flashes. rev. 1.94 works without problems.
here are some debug infos, tell me if you need more!when we want to erase the flashes with MEMERASE ioctl, we get these errors:
Erase at
0x00080000failed immediately: errno -5
MTDdo_erase_oneblock(): flash internal timeout
FYI.
I guess you have chips interleaved, right? I have the same problem with erase and even worse since write doesn't work for me either. According to David Vrabel, it may be broken when chips are interleaved.
-Regards,
Shawn.
Quoted 2 lines · dkey
we are using jffs2 on the dbox2 and AMD flash chips, but since rev. 1.96 of
cfi_cmdset_0002.cwe can't erase the flashes. rev. 1.94 works without problems.
"since 1.96" doesn't make sense. Any breakage would be from 1.95.
Quoted 1 line
here are some debug infos, tell me if you need more!
Part numbers of the flash chips and their configuration (interleaved etc.).
Quoted 1 line
would be please if anybody can take a look over the code or revert revision of
cfi_cmdset_0002.cto 1.94.
There's no reason why you can't revert to 1.94 yourself.
FWIW, I'm now of the opinion that chip_status() is definately broken for interleaved chips and probably cannot be made to work without ending up with a mess.
I would suggest using the data polling algorithm instead (where applicable).
Also, ignoring the internal flash timeout (DQ5 toggling) and instead relying on the software timeout might be acceptable. However, a repeatedly suspended erase keeps getting its software timeout extended and thus there is a possibility of the software timeout never occuring.
Hmmm. An internal timeout requires a chip reset and thus we can't
actually suspend an internally timed-out erase so the software timeout won't be extended.
David Vrabel
Signature · 4 lines
David Vrabel, Design Engineer Arcom, Clifton Road Tel: +44 (0)1223 411200 ext. 3233 Cambridge CB1 7EA, UK Web: http://www.arcom.com/