From: Bo Shen Date: Wed, 28 Aug 2013 14:54:26 +0000 (+0000) Subject: MTD: atmel_nand: support for software BCH ECC X-Git-Tag: v2014.01-rc1~3^2~12 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7604a3f920031aa6f3426eedf44494b69ae291e1;p=oweals%2Fu-boot.git MTD: atmel_nand: support for software BCH ECC Add possible to use software BCH ECC for atmel nand driver Signed-off-by: Bo Shen --- diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index da83f06e47..10011c6a8f 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