i.MX53 NAND FCB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX53 NAND FCB

1,708 Views
PlartiNuhtl
Contributor I

Hi.

 

Can anybody help me getting a correct NAND FCB (as defined on page 499/500 table 7-12 of the i.mx53 reference manual) for a 4KB Page 224B OOB NAND Flash?

 

My problem is the field at 0xB0 "Bad Block Marker Offset to Spare Byte", how do I set it? Better yet, how do I calculate it for an arbitrary flash chip?

 

Best Regards

Tags (1)
0 Kudos
5 Replies

1,049 Views
Noel_V
Contributor III

Hi all,

where to find a RECENT kobs-ng source ?

I'm was using kobs-ng-11.01.00 but there seem to be a lof of bugs into this version .

(uboot image is written 'strange' offsets due to uninitialezed variables ..  DDBT not initialized correctly... etc....

Regards Noel

0 Kudos

1,049 Views
hitlin37
Contributor I

Hi Peng,
I'm facing a problem when doing kob-ng u-boot on same board (imx53) with different nand chipset.

there was no problem with kobs-ng 10.11.01 with micron nand.

but than we changed the nand with samsung k9k8g08 u0d.

Now in my mfg tool,it wont boot with older kobs-ng.

So we tried it with newer one(kobs-ng11.01.00).

With new kobs-ng,we get to boot when we flash u-boot(mtd0) in the last in ucl.xml file(after kernel(mtd1) and android(mtd2) image.)

If we flash u-boot using kobs-ng before kernel,u-boot will boot fine,but than we get checksum error on kernel(bad data CRC.)

Do we need to change anything in mtd.c at bi_swap calculation?

Regards

Suvir
Peng Fushi said:

this code is from kobs-ng package in LTIB  :
1973 if (plat_config_data->m_u32EnDISBBM) {                                             //if the bad block marker swap enabled
1974 unsigned int nand_sections = mtd_writesize(md) >> 9;
1975 unsigned int nand_oob_per_section = ((mtd_oobsize(md) / nand_sections) >> 1) 1;    // figure out how many byte in one sections, note this is freescale own define-nation  
1976 unsigned int nand_trunks = mtd_writesize(md) / (512 + nand_oob_per_section);
1977 fcb->FCB_Block.m_u32DISBBM = 1;
1978 fcb->FCB_Block.m_u32BadBlockMarkerByte =
1979 mtd_writesize(md) - nand_trunks * nand_oob_per_section;        //this is freescale NFC bad block marker byte position  
1980
1981 fcb->FCB_Block.m_u32BBMarkerPhysicalOffsetInSpareData
1982 = (nand_sections - 1) * (512 + nand_oob_per_section) + 512 + 1;
1983 }

For detail , pls read the kobs-ng source file mtd.c , v2_rom_mtd_init , etc, note for different chip this code will be different

Peng Fushi

0 Kudos

1,049 Views
PlartiNuhtl
Contributor I

Thanks for your answers.

0 Kudos

1,049 Views
fushi_peng
NXP Employee
NXP Employee

this code is from kobs-ng package in LTIB  :
1973 if (plat_config_data->m_u32EnDISBBM) {                                             //if the bad block marker swap enabled
1974 unsigned int nand_sections = mtd_writesize(md) >> 9;
1975 unsigned int nand_oob_per_section = ((mtd_oobsize(md) / nand_sections) >> 1) << 1;    // figure out how many byte in one sections, note this is freescale own define-nation  
1976 unsigned int nand_trunks = mtd_writesize(md) / (512 + nand_oob_per_section);
1977 fcb->FCB_Block.m_u32DISBBM = 1;
1978 fcb->FCB_Block.m_u32BadBlockMarkerByte =
1979 mtd_writesize(md) - nand_trunks * nand_oob_per_section;        //this is freescale NFC bad block marker byte position  
1980
1981 fcb->FCB_Block.m_u32BBMarkerPhysicalOffsetInSpareData
1982 = (nand_sections - 1) * (512 + nand_oob_per_section) + 512 + 1;
1983 }

For detail , pls read the kobs-ng source file mtd.c , v2_rom_mtd_init , etc, note for different chip this code will be different

Peng Fushi

0 Kudos

1,049 Views
ShirleyYe
Contributor I

hi, 

The "Bad Block Marker Offset to Spare Byte" is the offset in mata data place which stores thedata in Bad block marker place. if the mata data for the flash you used is 10 bytes, you can set it from 0 to 9. Usually we set it to 0.

0 Kudos