On 11/01/2011 05:44 PM, Marek Vasut wrote: >> On 11/01/2011 05:12 PM, Marek Vasut wrote: >>>> On 10/31/2011 08:23 AM, Marek Vasut wrote: >>>>> Signed-off-by: Marek Vasut <marek.va...@gmail.com> >>>>> Cc: Albert ARIBAUD <albert.u.b...@aribaud.net> >>>>> --- >>> >>> [...] >>> >>>>> + for (page = 0; page <= total_pages; page++) { >>>>> + ret = spl_onenand_read_page(0, page, addr, data.pagesize); >>>>> + if (ret) >>>>> + total_pages++; >>>>> + else >>>>> + addr += data.pagesize; >>>>> + } >>>>> +} >>>> >>>> You want to skip to the next block if spl_onenand_read_page() fails >>>> (which can occur after you've already read some of the block). >>> >>> I want to skip to next page, not next block. >> >> That's not how we normally do things, and is not what the current >> OneNAND IPL does. >> >> Bad block markers apply to the entire block -- unless this is a >> difference I'm not aware of between NAND and OneNAND. > > Well then it will fail reading the whole block and continue onwards ... it's > a > bit slower like this.
It doesn't work like that. The bad block marker is in the first page of the block only (sometimes the second page can be used). The bad block marker is not placed on every page in the block, so if you continue to subsequent pages it will not fail, but you won't be getting the data you're expecting. -Scott _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot