
15 Mar
2021
15 Mar
'21
4:40 p.m.
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