summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorBo Shen <voice.shen@gmail.com>2013-08-28 14:54:26 +0000
committerScott Wood <scottwood@freescale.com>2013-11-13 17:20:26 -0600
commit7604a3f920031aa6f3426eedf44494b69ae291e1 (patch)
tree69b89ea00115eb4a07aa9f49f417a371dff28bb2 /drivers/mtd
parent63c4f17b2f8017d22241522a48c765073b8791b0 (diff)
downloadu-boot-imx-7604a3f920031aa6f3426eedf44494b69ae291e1.zip
u-boot-imx-7604a3f920031aa6f3426eedf44494b69ae291e1.tar.gz
u-boot-imx-7604a3f920031aa6f3426eedf44494b69ae291e1.tar.bz2
MTD: atmel_nand: support for software BCH ECC
Add possible to use software BCH ECC for atmel nand driver Signed-off-by: Bo Shen <voice.shen@gmail.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/atmel_nand.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index da83f06..10011c6 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -1178,7 +1178,11 @@ int atmel_nand_chip_init(int devnum, ulong base_addr)
mtd->priv = nand;
nand->IO_ADDR_R = nand->IO_ADDR_W = (void __iomem *)base_addr;
+#ifdef CONFIG_NAND_ECC_BCH
+ nand->ecc.mode = NAND_ECC_SOFT_BCH;
+#else
nand->ecc.mode = NAND_ECC_SOFT;
+#endif
#ifdef CONFIG_SYS_NAND_DBW_16
nand->options = NAND_BUSWIDTH_16;
#endif