From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Mon, 18 Jan 2010 05:52:16 +0100 Subject: [U-Boot] NAND read error on Sequoia In-Reply-To: <20100117230635.6800AC88AE@gemini.denx.de> References: <20091208220328.A1F9A19F3F@gemini.denx.de> <200912090709.18420.sr@denx.de> <20100117230635.6800AC88AE@gemini.denx.de> Message-ID: <201001180552.16999.sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Cc: Scott Wood Cc: Wolfgang Denk 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