[U-Boot] [PATCH v2 08/11] mtd/fsl_elbc: take NAND_ECC_SOFT_BCH config option into account

Valentin Longchamp valentin.longchamp at keymile.com
Wed Aug 28 16:04:26 CEST 2013


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

Signed-off-by: Valentin Longchamp <valentin.longchamp at keymile.com>
Acked-by: Scott Wood <scottwood at freescale.com>
---
Changes in v2: None

 drivers/mtd/nand/fsl_elbc_nand.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index 0fa776a..a023f97 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -771,8 +771,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);
-- 
1.8.0.1



More information about the U-Boot mailing list