Message ID | 1374832955-4544-8-git-send-email-valentin.longchamp@keymile.com |
---|---|
State | Superseded |
Delegated to: | York Sun |
Headers | show |
On Fri, 2013-07-26 at 12:02 +0200, Valentin Longchamp wrote: > 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> > --- > drivers/mtd/nand/fsl_elbc_nand.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) Acked-by: Scott Wood <scottwood@freescale.com> Is this for use with http://patchwork.ozlabs.org/patch/168855/ or do you have a 2K-page NAND that requires more than 1 bit of ECC correction? -Scott
On 08/13/2013 10:54 PM, Scott Wood wrote: > On Fri, 2013-07-26 at 12:02 +0200, Valentin Longchamp wrote: >> 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> >> --- >> drivers/mtd/nand/fsl_elbc_nand.c | 6 +++++- >> 1 file changed, 5 insertions(+), 1 deletion(-) > > Acked-by: Scott Wood <scottwood@freescale.com> > > Is this for use with http://patchwork.ozlabs.org/patch/168855/ or do you > have a 2K-page NAND that requires more than 1 bit of ECC correction? > We have a 2K-page NAND but we have found out that we need more than 1 bit of ECC correction otherwise with some suppliers we sometimes see uncorrectable bitflips. Valentin
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index 0fa776a..a023f97 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c @@ -771,8 +771,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);
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> --- drivers/mtd/nand/fsl_elbc_nand.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)