WCN 頁 1
ISSUE TITLE
MT7621 NAND flash patch for Uboot
SDK VERSION
4.3.2.5
CHIP
MT7621
Date
2015/09/22
Description:
Because MT7621 NAND controller use different offset for Bad block index in the flash’s OOB area, so it need to detect Bad Block at the first
time bootup, and write the bad block information in the flash, this patch fix MT7621 fail to detect factory bad block.
How to fix:
Please apply the patch to Uboot/drivers/nand/mtk_nand.c
After update the code, please use the new Uboot image for manufactory image.
For those boards which boot up with old Uboot image, the factory BBT table may have incorrect factory BBT table, and the BBT table will not be
upgraded even if the Uboot has been updated. To update the BBT table, please follow below steps to erase old BBT table and let new Uboot
create a correct BBT table.
1. Please update new Uboot first
2. Please calculate the BBT table location, it was located at the last 4 blocks of the entire flash, to know the location you have to get
flash size and block size of the NAND flash, for example if the flash is 128MB(0x8000000), and the block size is 128KB(0x20000), then
the location is at 0x8000000 – (4* 0x20000) = 0x7f80000, and the BBT table size is 4 * 0x20000 = 0x80000
3. Reboot device after update new Uboot
4. Press “4” to enter Uboot command line
5. Using below command to erase factory BBT table
nand rawe <BBT table address> <BBT table length>
in above case, it will be
nand rawe 7f80000 80000