public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* u-boot reports ecc error on blocks written by nandwrite
@ 2008-06-02 18:09 Mark Roths
  2008-06-02 21:35 ` James
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Roths @ 2008-06-02 18:09 UTC (permalink / raw)
  To: linux-mtd

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

^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <01c001c8c4fb$8ac04170$6601a8c0@mrothsduo>]

end of thread, other threads:[~2008-06-03  4:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-02 18:09 u-boot reports ecc error on blocks written by nandwrite Mark Roths
2008-06-02 21:35 ` James
     [not found] <01c001c8c4fb$8ac04170$6601a8c0@mrothsduo>
2008-06-02 22:18 ` James
2008-06-03  4:28   ` Mark Roths

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox