Skip to contentSkip to conversation

mtd: nand: fix initialization of BBT options

PATCH In review Daniel Schwierzeck 2 participants 2 messages Jun 8, 2013 – Jun 18, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: nand: fix initialization of BBT options

commit dfe64e2c89731a3f9950d7acd8681b68df2bae03

Author: Sergey Lapin <[email protected]>
Date:   Mon Jan 14 03:46:50 2013 +0000

mtd: resync with Linux-3.7.1

changed the initialization of BBT options. Fix drivers jz4740 and s3c2410 which have not been updated yet and cause compile errors.

---
Patch is compile tested on boards smdk2410 and qi_lb60

---
 drivers/mtd/nand/jz4740_nand.c  | 2 +-
 drivers/mtd/nand/s3c2410_nand.c | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/mtd/nand/jz4740_nand.c +1 -1
index a691fbc..9421e56 100644
@@ -256,7 +256,7 @@ int board_nand_init(struct nand_chip *nand)
 	nand->ecc.strength	= 4;
 	nand->ecc.layout	= &qi_lb60_ecclayout_2gb;
 	nand->chip_delay	= 50;
-	nand->options		= NAND_USE_FLASH_BBT;
+	nand->bbt_options	|= NAND_BBT_USE_FLASH;
 
 	return 0;
 }
drivers/mtd/nand/s3c2410_nand.c +1 -3
index 43d8213..1187b9f 100644
@@ -179,9 +179,7 @@ int board_nand_init(struct nand_chip *nand)
 #endif
 
 #ifdef CONFIG_S3C2410_NAND_BBT
-	nand->options = NAND_USE_FLASH_BBT;
-#else
-	nand->options = 0;
+	nand->bbt_options |= NAND_BBT_USE_FLASH;
 #endif
 
 	debug("end of nand_init\n");
Signature · 1 line
1.8.1.2
#1 lore raw
Quoted 11 lines · Daniel Schwierzeck

commit dfe64e2c89731a3f9950d7acd8681b68df2bae03

Author: Sergey Lapin <[email protected]>
Date:   Mon Jan 14 03:46:50 2013 +0000

mtd: resync with Linux-3.7.1

changed the initialization of BBT options. Fix drivers jz4740 and s3c2410 which have not been updated yet and cause compile errors.

Thanks -- I missed jz4740 because I don't have a MIPS toolchain, and s3c2410 because CONFIG_S3C2410_NAND_BBT is not defined in any config.

Applied to u-boot-nand-flash.

-Scott