summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Brunck <holger.brunck@keymile.com>2013-01-21 03:55:22 +0000
committerKim Phillips <kim.phillips@freescale.com>2013-02-15 17:47:20 -0600
commit938187329afa437407fd19831ce2fde7cbb0869c (patch)
treeef3b370ccf238a6ab74d2992d9d198952f0bd5e9
parentd42a3b74980e65e72185a07f9f556e00587e7349 (diff)
downloadu-boot-imx-938187329afa437407fd19831ce2fde7cbb0869c.zip
u-boot-imx-938187329afa437407fd19831ce2fde7cbb0869c.tar.gz
u-boot-imx-938187329afa437407fd19831ce2fde7cbb0869c.tar.bz2
kmeter1_nand: allow uasge of NAND_ECC_SOFT_BCH
If CONFIG_NAND_ECC_BCH is set we use 4-bit error corretion code instead of the 1-bit error correction code on the NAND device within this driver. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Acked-by: Scott Wood <scottwood@freescale.com>
-rw-r--r--drivers/mtd/nand/kmeter1_nand.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/nand/kmeter1_nand.c b/drivers/mtd/nand/kmeter1_nand.c
index e8e5b7b..f044597 100644
--- a/drivers/mtd/nand/kmeter1_nand.c
+++ b/drivers/mtd/nand/kmeter1_nand.c
@@ -119,7 +119,11 @@ static int kpn_nand_dev_ready(struct mtd_info *mtd)
int board_nand_init(struct nand_chip *nand)
{
+#if defined(CONFIG_NAND_ECC_BCH)
+ nand->ecc.mode = NAND_ECC_SOFT_BCH;
+#else
nand->ecc.mode = NAND_ECC_SOFT;
+#endif
/* Reference hardware control function */
nand->cmd_ctrl = kpn_nand_hwcontrol;