Commit 26d9be11 authored by Artem Bityutskiy's avatar Artem Bityutskiy Committed by David Woodhouse

mtd: return badblockbits back

In commit c7b28e25 the initialization of
the backblockbits was accidentally removed. This patch returns it back,
because otherwise some NAND drivers are broken.

This problem was reported by "Saxena, Parth <parth.saxena@ti.com>" here:
http://lists.infradead.org/pipermail/linux-mtd/2011-April/035221.htmlReported-by: default avatarSaxena, Parth <parth.saxena@ti.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tested-by: default avatarSaxena, Parth <parth.saxena@ti.com>
Acked-by: default avatarSaxena, Parth <parth.saxena@ti.com>
Acked-by: default avatarBrian Norris <computersforpeace@gmail.com>
Cc: stable@kernel.org [2.6.36+]
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 410fe2f0
......@@ -3106,6 +3106,8 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
chip->chip_shift += 32 - 1;
}
chip->badblockbits = 8;
/* Set the bad block position */
if (mtd->writesize > 512 || (busw & NAND_BUSWIDTH_16))
chip->badblockpos = NAND_LARGE_BADBLOCK_POS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment