[Qi] bad magic when booting from NAND
dmitry.kurochkin at gmail.com
Tue May 5 09:35:37 CEST 2009
Hi Nelson, Werner.
Can you please review and apply the patch?
On Fri, Apr 10, 2009 at 12:14 AM, Dmitry Kurochkin
<dmitry.kurochkin at gmail.com> wrote:
> I have found the problem. The error was because we check if the
> current block is bad or the next one is bad. And skip the current
> block even if only the next one is bad. This way we skip good block
> before a bad one.
> Attached is a patch to fix it. Besides I have removed 4 bad block
> count limit. Instead I check if we read till the end of nand. Or at
> least this is what this code supposed to do:
> if (start_block512 >> 2 > BAD_BLOCK_OFFSET)
> /* end of NAND */
> return -1;
> I am not sure this is the best and/or correct way to do the stop check.
> A similar check for bad block ahead the current one was added to
> u-boot in commit 4ec60973cf2e028de905f6ea1f81ef99ca60d834 by Michael:
> Change the skip bad block. Avoid false positives by only checking
> the beginning of a block and check the second page
> Qi code does the same thing. But it seems to be wrong at least in my case.
More information about the openmoko-kernel