bad block check loop in nand: mxs_nand_spl
Tahsin Türker Mutlugün
tmutlugun2 at hotmail.com
Mon Mar 15 16:40:18 CET 2021
Hello everyone,
In mxs_nand_spl.c:nand_spl_load_image, if a bad block is found it should
supposedly loop until a good block is found. However is_badblock() is
called with the same offset over and over. Is this a bug or am I missing
something here?
/* * Check if we have crossed a block boundary, and if so * check for
bad block. */ if (!(page % nand_page_per_block)) { /* * Yes, new block.
See if this block is good. If not, * loop until we find a good block. */
while (is_badblock(mtd, offs, 1)) { page = page + nand_page_per_block;
/* Check i we've reached the end of flash. */ if (page >= mtd->size >>
chip->page_shift) { free(page_buf); return -ENOMEM; } } }
Thank you for your time.
Türker
More information about the U-Boot
mailing list