Skip to contentSkip to conversation

mtd: fsl_ifc_nand: fix eccstrength for ecc8

PATCH In review Scott Wood 2 participants 2 messages May 28, 2013 – May 29, 2013

Subsystems (2)
lore
Share & tools
lore

Scott Wood

author
#0 lore raw

PATCH 1/1 mtd: fsl_ifc_nand: fix eccstrength for ecc8

Commit 44df4d11b8f573e9efcba94d63e6a1ad148c76d0 ("mtd: nand: fix incorrect ecc strength values") set eccstrength to 4 for IFC, but it is 8 in one configuration.

---
 drivers/mtd/nand/fsl_ifc_nand.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/mtd/nand/fsl_ifc_nand.c +4 -1
index f1f7f12..3469e5d 100644
@@ -843,7 +843,6 @@ static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv)
 	/* Hardware generates ECC per 512 Bytes */
 	chip->ecc.size = 512;
 	chip->ecc.bytes = 8;
-	chip->ecc.strength = 4;
 
 	switch (csor & CSOR_NAND_PGS_MASK) {
 	case CSOR_NAND_PGS_512:
@@ -857,11 +856,13 @@ static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv)
 			bbt_mirror_descr.offs = 0;
 		}
 
+		chip->ecc.strength = 4;
 		priv->bufnum_mask = 15;
 		break;
 
 	case CSOR_NAND_PGS_2K:
 		layout = &oob_2048_ecc4;
+		chip->ecc.strength = 4;
 		priv->bufnum_mask = 3;
 		break;
 
@@ -869,8 +870,10 @@ static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv)
 		if ((csor & CSOR_NAND_ECC_MODE_MASK) ==
 		    CSOR_NAND_ECC_MODE_4) {
 			layout = &oob_4096_ecc4;
+			chip->ecc.strength = 4;
 		} else {
 			layout = &oob_4096_ecc8;
+			chip->ecc.strength = 8;
 			chip->ecc.bytes = 16;
 		}
 
Signature · 1 line
1.7.10.4