Skip to contentSkip to conversation

NAND Bad Blocks and OOB

U-Boot VirtualFight at web.de 2 participants 2 messages Mar 18, 2011

lore
Share & tools
lore
#0 lore raw

Hi all,
I have some questions about the bad block management in the NAND-driver, I hope this is the right place to ask this:

The things I believe to know, please correct me, if its wrong:
If
I have a new NAND-Flash, the manufacturer marked the bad block in the
spare area/OOB (normaly good blocks are marked as 0xFF in the first 2 bytes?).
The u-boot scans for these bad blocks and saves the information in the bbt.

What
happens, if a block gets worn out? Would this block only be markes as
bad in the bbt, or would this information would be also stored in the spare area (the driver write another value, not 0xFF in the firts 2 bytes?).
Is it possible to restore the bad block informations, if the
whole nand-flash would be erased (for example by writing 0 in all block and after this by erasing the blocks and check the error status bit of
the NAND-flash device)?
If yes, is such a function implemented in u-boot?

thanks in advance,
marc

___________________________________________________________
Handy Internet-Flat ? gratis ? mit WEB.DE FreePhone Jetzt informieren: http://produkte.web.de/go/freephonesurfflat

#1 lore raw
Quoted 11 lines · On Fri, 18 Mar 2011 12:43:06 +0100 <[email protected]> wrote:

Hi all,
I have some questions about the bad block management in the NAND-driver, I hope this is the right place to ask this:

The things I believe to know, please correct me, if its wrong:
If
I have a new NAND-Flash, the manufacturer marked the bad block in the
spare area/OOB (normaly good blocks are marked as 0xFF in the first 2 bytes?).
The u-boot scans for these bad blocks and saves the information in the bbt.

Quoted 5 lines

What
happens, if a block gets worn out? Would this block only be markes as
bad in the bbt, or would this information would be also stored in the spare area (the driver write another value, not 0xFF in the firts 2 bytes?).

As long as you have an in-flash bbt, it only gets marked in the bbt. If you don't have an in-flash bbt, an OOB bad block marker is written.

Quoted 4 lines

Is it possible to restore the bad block informations, if the
whole nand-flash would be erased (for example by writing 0 in all block and after this by erasing the blocks and check the error status bit of
the NAND-flash device)?

It's possible to do your own testing and mark blocks bad as a result, but you're not really restoring the original information. The manufacturer may have used a more rigorous test.

Quoted 1 line

If yes, is such a function implemented in u-boot?

No. You should avoid clearing manufacturer-set bad block markers.

-Scott