diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index ddffe76..71052d0 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -409,7 +409,10 @@ static int nand_default_block_markbad(struct mtd_info *mtd, loff_t ofs) /* Do we have a flash based bad block table ? */ if (chip->options & NAND_USE_FLASH_BBT) ret = nand_update_bbt(mtd, ofs); - else { + /* put also the bad block marker in case we loose BBT or + the bootloader doesn't support reading it + */ + { nand_get_device(chip, mtd, FL_WRITING); /* Write to first two pages and to byte 1 and 6 if necessary.