Explorar o código

mtd/fsl_elbc: take NAND_ECC_SOFT_BCH config option into account

NAND_ECC_SOFT was the only option available while the SOFT_BCH option
may also be used.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Valentin Longchamp %!s(int64=11) %!d(string=hai) anos
pai
achega
2f9e559a6c
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      drivers/mtd/nand/fsl_elbc_nand.c

+ 5 - 1
drivers/mtd/nand/fsl_elbc_nand.c

@@ -759,8 +759,12 @@ static int fsl_elbc_chip_init(int devnum, u8 *addr)
 		nand->ecc.steps = 1;
 		nand->ecc.strength = 1;
 	} else {
-		/* otherwise fall back to default software ECC */
+		/* otherwise fall back to software ECC */
+#if defined(CONFIG_NAND_ECC_BCH)
+		nand->ecc.mode = NAND_ECC_SOFT_BCH;
+#else
 		nand->ecc.mode = NAND_ECC_SOFT;
+#endif
 	}
 
 	ret = nand_scan_ident(mtd, 1, NULL);