[U-Boot] handling of bad blocks in nand

Scott Wood scottwood at freescale.com
Fri Jun 25 17:50:38 CEST 2010


On 06/25/2010 05:18 AM, Arno Steffen wrote:
> 2010/6/24 Scott Wood<scottwood at freescale.com>:
>> On 06/24/2010 01:28 AM, Arno Steffen wrote:
>>>
>>> does it mean in other words - I don't have to care for the bad block,
>>> can write on the bad block address as it would be ok?
>>
>> You can't write directly to that block, but it can be included in a range of
>> blocks as long as the range is large enough to hold the data blocks plus the
>> bad blocks.
>
> Mhh. Think we misunderstood each other.
> Lets asume block with 0x10.0000 is bad.
>
> I would guess from what you told me before that I could read/write to 0x10.0000.
> Of course this is than internally redirected, but from uboot point of
> view I hope to
> can do
>
> nand write 0x8000.0000 0x10.0000 1000

It is "redirected" to the next good block after the one you're trying to 
write to.  But it is not fully transparent.  Suppose the block at 
0x100000 is bad, and the next block at 0x120000 is good.

If you do the above command, it will skip the bad block and write to 
0x120000.  But if you then do "nand write 80000000 120000 1000", you 
will overwrite what you previously wrote.

-Scott


More information about the U-Boot mailing list