summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
authorValentin Longchamp <valentin.longchamp@keymile.com>2013-10-18 11:47:22 +0200
committerYork Sun <yorksun@freescale.com>2013-10-24 09:36:05 -0700
commit2f9e559a6cd0b33acbc00a2ea040121c03a8f80b (patch)
treeb74ab3e4cda701c6ff031bdccfb766b7af6c4cd6 /drivers/mtd/nand
parentf51d3b71d4d3eacfbbc6e2cf3fa197774df5f638 (diff)
downloadu-boot-imx-2f9e559a6cd0b33acbc00a2ea040121c03a8f80b.zip
u-boot-imx-2f9e559a6cd0b33acbc00a2ea040121c03a8f80b.tar.gz
u-boot-imx-2f9e559a6cd0b33acbc00a2ea040121c03a8f80b.tar.bz2
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>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/fsl_elbc_nand.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index 7952097..2f31fc9 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);