[Qi] bad magic when booting from NAND
trimarchi at gandalf.sssup.it
Fri Apr 10 20:06:18 CEST 2009
Dmitry Kurochkin 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
It's mine, but I don't know why Andy don't patch qi too.
> Qi code does the same thing. But it seems to be wrong at least in my case.
More information about the openmoko-kernel