* [U-Boot] NAND read error on Sequoia
@ 2009-12-08 22:03 Wolfgang Denk
2009-12-09 6:09 ` Stefan Roese
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2009-12-08 22:03 UTC (permalink / raw)
To: u-boot
Hi Stefan,
it seems there is a problem with NAND on Sequoia:
U-Boot 2009.11-rc2 (Dec 08 2009 - 22:52:34)
...
NAND: 32 MiB
...
=> nand read 200000 0 2000000
NAND read: device 0 whole chip
Attempt to read outside the flash area
33554432 bytes read: ERROR
As you can see, I try to read the whole device (32 MB), which is
actually detectd correctly ("device 0 whole chip"), but then is
misinterpreted ("outside the flash area").
Also, it would be nice if a "nand read" could be interrupted by a
^C...
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The pathology is to want control, not that you ever get it, because
of course you never do." - Gregory Bateson
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] NAND read error on Sequoia
2009-12-08 22:03 [U-Boot] NAND read error on Sequoia Wolfgang Denk
@ 2009-12-09 6:09 ` Stefan Roese
2010-01-17 23:06 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Roese @ 2009-12-09 6:09 UTC (permalink / raw)
To: u-boot
Hi Wolfgang,
[Added Scott to Cc]
On Tuesday 08 December 2009 23:03:28 Wolfgang Denk wrote:
> it seems there is a problem with NAND on Sequoia:
>
> U-Boot 2009.11-rc2 (Dec 08 2009 - 22:52:34)
> ...
> NAND: 32 MiB
> ...
> => nand read 200000 0 2000000
>
> NAND read: device 0 whole chip
> Attempt to read outside the flash area
> 33554432 bytes read: ERROR
>
> As you can see, I try to read the whole device (32 MB), which is
> actually detectd correctly ("device 0 whole chip"), but then is
> misinterpreted ("outside the flash area").
I don't think that this is a Sequoia (4xx NDFC) specific problem. My first
idea was that this is caused because of bad blocks. Bad blocks are skipped
upon read, but "nand read" still wants to read 32MByte in total. Which is not
possible when bad blocks are available.
But this is not the case here. I just verified this on sequoia (most likely
the one you used). No bad blocks here. And it still fails. Reading with one
block (block size 16k) less seems to be ok though:
=> nand read 200000 0 1ffc000
NAND read: device 0 offset 0x0, size 0x1ffc000
33538048 bytes read: OK
And just reading the last block also doesn't work:
=> nand read 200000 1ffc000 4000
NAND read: device 0 offset 0x1ffc000, size 0x4000
Attempt to read outside the flash area
16384 bytes read: ERROR
Not sure why this is the case. Perhaps an "off by one" error? Scott do you
have an idea?
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] NAND read error on Sequoia
2009-12-09 6:09 ` Stefan Roese
@ 2010-01-17 23:06 ` Wolfgang Denk
2010-01-18 4:52 ` Stefan Roese
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2010-01-17 23:06 UTC (permalink / raw)
To: u-boot
Dear Stefan Roese,
In message <200912090709.18420.sr@denx.de> you wrote:
>
> [Added Scott to Cc]
>
> On Tuesday 08 December 2009 23:03:28 Wolfgang Denk wrote:
> > it seems there is a problem with NAND on Sequoia:
> >
> > U-Boot 2009.11-rc2 (Dec 08 2009 - 22:52:34)
> > ...
> > NAND: 32 MiB
> > ...
> > => nand read 200000 0 2000000
> >
> > NAND read: device 0 whole chip
> > Attempt to read outside the flash area
> > 33554432 bytes read: ERROR
> >
> > As you can see, I try to read the whole device (32 MB), which is
> > actually detectd correctly ("device 0 whole chip"), but then is
> > misinterpreted ("outside the flash area").
>
> I don't think that this is a Sequoia (4xx NDFC) specific problem. My first
> idea was that this is caused because of bad blocks. Bad blocks are skipped
> upon read, but "nand read" still wants to read 32MByte in total. Which is not
> possible when bad blocks are available.
>
> But this is not the case here. I just verified this on sequoia (most likely
> the one you used). No bad blocks here. And it still fails. Reading with one
> block (block size 16k) less seems to be ok though:
>
> => nand read 200000 0 1ffc000
>
> NAND read: device 0 offset 0x0, size 0x1ffc000
> 33538048 bytes read: OK
>
> And just reading the last block also doesn't work:
>
> => nand read 200000 1ffc000 4000
>
> NAND read: device 0 offset 0x1ffc000, size 0x4000
> Attempt to read outside the flash area
> 16384 bytes read: ERROR
>
> Not sure why this is the case. Perhaps an "off by one" error? Scott do you
> have an idea?
Any progress on this?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Go to Heaven for the climate, Hell for the company." - Mark Twain
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] NAND read error on Sequoia
2010-01-17 23:06 ` Wolfgang Denk
@ 2010-01-18 4:52 ` Stefan Roese
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Roese @ 2010-01-18 4:52 UTC (permalink / raw)
To: u-boot
Hi Wolfgang,
On Monday 18 January 2010 00:06:35 Wolfgang Denk wrote:
> > I don't think that this is a Sequoia (4xx NDFC) specific problem. My
> > first idea was that this is caused because of bad blocks. Bad blocks are
> > skipped upon read, but "nand read" still wants to read 32MByte in total.
> > Which is not possible when bad blocks are available.
> >
> > But this is not the case here. I just verified this on sequoia (most
> > likely the one you used). No bad blocks here. And it still fails. Reading
> > with one block (block size 16k) less seems to be ok though:
> >
> > => nand read 200000 0 1ffc000
> >
> > NAND read: device 0 offset 0x0, size 0x1ffc000
> > 33538048 bytes read: OK
> >
> > And just reading the last block also doesn't work:
> >
> > => nand read 200000 1ffc000 4000
> >
> > NAND read: device 0 offset 0x1ffc000, size 0x4000
> > Attempt to read outside the flash area
> > 16384 bytes read: ERROR
> >
> > Not sure why this is the case. Perhaps an "off by one" error? Scott do
> > you have an idea?
>
> Any progress on this?
Yes. And my patch fixing this issue is already in mainline:
f4cfe42758192d09f8375e384cc000aa70d97029
nand: Fix access to last block in NAND devices
Currently, the last block of NAND devices can't be accessed. This patch
fixes this issue by correcting the boundary checking (off-by-one error).
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Wolfgang Denk <wd@denx.de>
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-01-18 4:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-08 22:03 [U-Boot] NAND read error on Sequoia Wolfgang Denk
2009-12-09 6:09 ` Stefan Roese
2010-01-17 23:06 ` Wolfgang Denk
2010-01-18 4:52 ` Stefan Roese
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox