From: Valentin Longchamp Date: Fri, 18 Oct 2013 09:47:22 +0000 (+0200) Subject: mtd/fsl_elbc: take NAND_ECC_SOFT_BCH config option into account X-Git-Tag: v2014.01-rc1~191 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2f9e559a6cd0b33acbc00a2ea040121c03a8f80b;p=u-boot 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 Acked-by: Scott Wood --- diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index 795209788b..2f31fc96ad 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/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);