[PATCH] mtd: rawnand: brcmnand: Add bad block marker option.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In commit 04649ec1335f ("mtd: rawnand: Always store info about bad
block markers in chip struct") changed where the information of the
bad block markers are stored. It is now stored in nand_chip.options
and nand_chip.badblockpos. However brcmnand driver wasn't updated
so it now fails to handle bad blocks.

So update brcmnand driver to add bad block markers to nand_chip.options.

Signed-off-by: Oscar Ravadilla <oscar.ravadilla@xxxxxxxxxxxxxxxxxxx>
---
 drivers/mtd/nand/raw/brcmnand/brcmnand.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
index 1a66b1cd51c0..68d37d1636ae 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
@@ -2360,6 +2360,8 @@ static int brcmnand_attach_chip(struct nand_chip *chip)
 	 * needed.
 	 */
 	chip->options |= NAND_USE_BOUNCE_BUFFER;
+	chip->options |= NAND_BBM_FIRSTPAGE | NAND_BBM_SECONDPAGE |
+			NAND_BBM_LASTPAGE;
 
 	if (chip->bbt_options & NAND_BBT_USE_FLASH)
 		chip->bbt_options |= NAND_BBT_NO_OOB;
-- 
2.23.0


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux