In am335x sdk, the file driver/mtd/nand/omap2.c:
info->nand.options = pdata->devsize; //1. why using devsize
info->nand.options |= NAND_SKIP_BBTSCAN; //2. relationship with u-boot BBT
I change like this:
#if 0
info->nand.options = pdata->devsize;
info->nand.options |= NAND_SKIP_BBTSCAN;
#else
info->nand.bbt_options |= NAND_BBT_USE_FLASH;
#endif
At the same time in u-boot:
//am335x_evm.h
#define CONFIG_SYS_NAND_USE_FLASH_BBT
//omap_gpmc.c
nand->options = NAND_NO_PADDING | NAND_CACHEPRG | NAND_NO_AUTOINCR;
#ifdef CONFIG_SYS_NAND_USE_FLASH_BBT
nand->options |= NAND_USE_FLASH_BBT;
#endif
Is there any some question to enable BBT in NAND (not in ram)?