diff mbox

[U-Boot,v1,7/8] mtd/fsl_elbc: take NAND_ECC_SOFT_BCH config option into accout

Message ID 1374832955-4544-8-git-send-email-valentin.longchamp@keymile.com
State Superseded
Delegated to: York Sun
Headers show

Commit Message

Valentin Longchamp July 26, 2013, 10:02 a.m. UTC
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(-)

Comments

Scott Wood Aug. 13, 2013, 8:54 p.m. UTC | #1
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
Valentin Longchamp Aug. 19, 2013, 3:34 p.m. UTC | #2
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 mbox

Patch

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);