u-boot reports ecc error on blocks written by nandwrite
Mark Roths
mroths at softairmicro.com
Mon Jun 2 14:09:17 EDT 2008
I am running 2.6.20.11 on Atmel AT91SAM9261 and u-boot 1.1.5 with Atmel
patch 1.6.
I have ST 1Gb flash - NAND01GR3B2BZA6, 2k page, 128k eraseblock, 64 oob.
I would like to use nanderase and nandwrite to overwrite the u-boot
environment from Linux. Unfortunately,
although the data is written correctly, as verified by cmp, u-boot always
reports an ecc error
upon bootup afterwards. I am using nandwrite
* $Id: nandwrite.c,v 1.32 2005/11/07 11:15:13 gleixner Exp $
I have tried exactly copying a block using nanddump, including oob data, and
writing it back but I still have the ecc error.
I tried without the oob data, and lots of variations on the options to
nanddump and nandwrite.
Any block written by nandwrite appears to u-boot to have ecc errors after a
reboot. A further weirdness is that if I request a very small number of
bytes from the block, e.g. 1, it fails once, then succeeds. I am using the
u-boot command 'nand read 0x20800000 0xa0000 1'. All further reads of any
size up to the entire block then will succeed. If I reboot, the error
recurs.
There appears to be a discrepancy between how the linux mtd driver and
u-boot handle the ecc. Or I am doing something
boneheadded.
Mark Roths
Softair Microsystems
phone: 831 621 6274
fax: 831 621 6275
More information about the linux-mtd
mailing list