Hi Igor,
ok, the u-boot 2013.04 uses the NAND BBT (you must use a BBT management with NAND flash), but I'm speaking about the function to solve the BBI (Bad Block Indicator) problem in the i.MX53 NAND controller, as described in the "NAND Flash Bad Block Management Changes" application note (see the attachment above).
As you can read from the Application Note, a workaround is necessary to use correctly the bad block indicator.
I'm speaking about this function of the mxc_nand.c file (u-boot-2009.08-imx):
static void mxc_nand_bi_swap(struct mtd_info *mtd)
{
struct nand_chip *this = mtd->priv;
struct nand_info *info = this->priv;
u16 ma, sa, nma, nsa;
if (!IS_LARGE_PAGE_NAND)
return;
ma = __raw_readw(BAD_BLK_MARKER_MAIN);
sa = __raw_readw(BAD_BLK_MARKER_SP);
nma = (ma & 0xFF00) | (sa >> 8);
nsa = (sa & 0x00FF) | (ma << 8);
__raw_writew(nma, BAD_BLK_MARKER_MAIN);
__raw_writew(nsa, BAD_BLK_MARKER_SP);
}
and this function is not more present in the new versions of u-boot.
My question is if this workaround is implemented with a different algorithm in the new u-boots or, instead, if it was forgotten!
Thank you for your help,
Flavio