* RE: u-boot reports ecc error on blocks written by nandwrite
[not found] <01c001c8c4fb$8ac04170$6601a8c0@mrothsduo>
@ 2008-06-02 22:18 ` James
2008-06-03 4:28 ` Mark Roths
0 siblings, 1 reply; 4+ messages in thread
From: James @ 2008-06-02 22:18 UTC (permalink / raw)
To: Mark Roths; +Cc: linux-mtd
On Mon, 2008-06-02 at 14:56 -0700, Mark Roths wrote:
> Yes, u-boot can erase, write, and read with no problems on its own.
> I use the u-boot nand utilities to build my flash with bootloader, u-boot,
> linux and initrd. All that works fantastically.
>
> The only time I have problems is when I write a block in my boot partition
> using nandwrite, and then subsequently read it with u-boot on the next boot.
> And the completely strange behavior is that if I request 1 byte using 'nand
> read', it fails the 1st time and then succeeds - all reads succeed after
> that with no ecc errors.
Sounds almost like a cache problem.
> Both the mtdchar driver and u-boot are configured for soft ecc, or so I
> believe from my reading of the code.
Likely.
I've had a plethora of problems using the NAND MT29F2G08AACWP on some
AT91SAM9263-EK boards. I now feel it might be a timing issue. Maybe
yours is too!
Regards,
James.
^ permalink raw reply [flat|nested] 4+ messages in thread* RE: u-boot reports ecc error on blocks written by nandwrite
2008-06-02 22:18 ` u-boot reports ecc error on blocks written by nandwrite James
@ 2008-06-03 4:28 ` Mark Roths
0 siblings, 0 replies; 4+ messages in thread
From: Mark Roths @ 2008-06-03 4:28 UTC (permalink / raw)
To: 'James'; +Cc: linux-mtd
I haven't had a plethora of problems, just this one. It is also extremely
reproducible leading me to not suspect any kind of timing problem.
Everything else works find, JFFS2, boot partition etc.
But when I write a block with nandwrite, u-boot chokes on it.
-Mark
> -----Original Message-----
> From: James [mailto:jamessteward@optusnet.com.au]
> Sent: Monday, June 02, 2008 3:19 PM
> To: Mark Roths
> Cc: linux-mtd@lists.infradead.org
> Subject: RE: u-boot reports ecc error on blocks written by nandwrite
>
>
> On Mon, 2008-06-02 at 14:56 -0700, Mark Roths wrote:
> > Yes, u-boot can erase, write, and read with no problems on its own.
> > I use the u-boot nand utilities to build my flash with bootloader, u-
> boot,
> > linux and initrd. All that works fantastically.
> >
> > The only time I have problems is when I write a block in my boot
> partition
> > using nandwrite, and then subsequently read it with u-boot on the next
> boot.
> > And the completely strange behavior is that if I request 1 byte using
> 'nand
> > read', it fails the 1st time and then succeeds - all reads succeed after
> > that with no ecc errors.
>
> Sounds almost like a cache problem.
>
> > Both the mtdchar driver and u-boot are configured for soft ecc, or so I
> > believe from my reading of the code.
>
> Likely.
>
> I've had a plethora of problems using the NAND MT29F2G08AACWP on some
> AT91SAM9263-EK boards. I now feel it might be a timing issue. Maybe
> yours is too!
>
> Regards,
> James.
^ permalink raw reply [flat|nested] 4+ messages in thread
* 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
* Re: 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, 0 replies; 4+ messages in thread
From: James @ 2008-06-02 21:35 UTC (permalink / raw)
To: Mark Roths; +Cc: linux-mtd
Hi Mark,
On Mon, 2008-06-02 at 11:09 -0700, Mark Roths wrote:
> There appears to be a discrepancy between how the linux mtd driver and
> u-boot handle the ecc. Or I am doing something
> boneheadded.
It is unlikely but possible that you have one configured for hardware
ECC, and the other software ECC.
Can U-boot erase, write and read back some data properly?
(see u-boot-1.1.5/doc/README.nand for commands)
You are erasing before writing?
Regards,
James.
^ permalink raw reply [flat|nested] 4+ messages in thread
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 --
[not found] <01c001c8c4fb$8ac04170$6601a8c0@mrothsduo>
2008-06-02 22:18 ` u-boot reports ecc error on blocks written by nandwrite James
2008-06-03 4:28 ` Mark Roths
2008-06-02 18:09 Mark Roths
2008-06-02 21:35 ` James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox