Samsung K9F1G08 - bad block check

stefano babic stefano.babic at babic.homelinux.org
Mon Sep 17 04:52:44 EDT 2007


Hi all,

I have a system with a TI OMAP and the NAND Samsung K9F1G08. I have seen 
there is already an issue regarding this flash, but I think I have a 
different topic.

According to the Samsung datasheet, the initial invalid block(s) status 
is defined by the 1st byte in the spare area. However, in nand_bbt.c, 
for chips with a large page size (as this one,2KB), a 16-bit word is 
always checked:

if (!this->badblock_pattern) {
                         this->badblock_pattern = (mtd->writesize > 512) 
? &largepage_memorybased : &smallpage_memorybased;

And the len field in largepage_memorybased is set to 2.

This has the effect that blocks are declared "bad" even if they are not. 
  To load the bootloader, TI OMAP requires that the bootloader itself is 
stored using the OMAP-ECC schema in the first blocks. This uses bytes 
1-12 of OOB. The linux driver checks byte 1 and reports the block as 
bad, because this cannot be 0xFF.

It seems to me that the length to be checked is chip (or manufacturer..) 
specific and cannot be set as now with a static structure.

stefano

-- 
stefano <stefano.babic at babic.homelinux.org>
GPG Key: 0x55814DDE
Fingerprint 4E85 2A66 4CBA 497A 2A7B D3BF 5973 F216 5581 4DDE



More information about the linux-mtd mailing list