diff options
Diffstat (limited to 'common/imx-bbu-nand-fcb.c')
-rw-r--r-- | common/imx-bbu-nand-fcb.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/common/imx-bbu-nand-fcb.c b/common/imx-bbu-nand-fcb.c index bb6dd1d4e9..aa3f733912 100644 --- a/common/imx-bbu-nand-fcb.c +++ b/common/imx-bbu-nand-fcb.c @@ -626,8 +626,15 @@ static int imx_bbu_write_firmware(struct mtd_info *mtd, unsigned num, void *buf, continue; ret = mtd_peb_erase(mtd, block + i); - if (ret && ret != -EIO) + if (ret == -EIO) { + newbadblock = 1; + + ret = mtd_peb_mark_bad(mtd, block + i); + if (ret) + return ret; + } else if (ret) { return ret; + } } while (len > 0) { |