mtd: nand: fix incorrect ecc strength values
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Mon May 28 07:59:07 EDT 2012
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=44df4d11b8f573e9efcba94d63e6a1ad148c76d0
Commit: 44df4d11b8f573e9efcba94d63e6a1ad148c76d0
Parent: 86c2072be6f3c2150cc35f00233f2c31bdba2745
Author: Mike Dunn <mikedunn at newsguy.com>
AuthorDate: Wed Apr 25 12:06:06 2012 -0700
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Sun May 13 23:10:28 2012 -0500
mtd: nand: fix incorrect ecc strength values
This fixes a couple of ecc strength values for which I earlier made conservative
guesses, but whose correct values were later determined¹ (thanks Ivan). Also
sets strength for fsl_ifc_nand, which was merged to mainline after the original
patch that set the strength for all drivers.
¹ http://lists.infradead.org/pipermail/linux-mtd/2012-March/040325.html
Signed-off-by: Mike Dunn <mikedunn at newsguy.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/nand/bcm_umi_nand.c | 7 +------
drivers/mtd/nand/fsl_ifc_nand.c | 1 +
drivers/mtd/nand/jz4740_nand.c | 6 +-----
3 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/mtd/nand/bcm_umi_nand.c b/drivers/mtd/nand/bcm_umi_nand.c
index 6908cdd..7134adf 100644
--- a/drivers/mtd/nand/bcm_umi_nand.c
+++ b/drivers/mtd/nand/bcm_umi_nand.c
@@ -476,12 +476,7 @@ static int __devinit bcm_umi_nand_probe(struct platform_device *pdev)
this->badblock_pattern = &largepage_bbt;
}
- /*
- * FIXME: ecc strength value of 6 bits per 512 bytes of data is a
- * conservative guess, given 13 ecc bytes and using bch alg.
- * (Assume Galois field order m=15 to allow a margin of error.)
- */
- this->ecc.strength = 6;
+ this->ecc.strength = 8;
#endif
diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c
index 5387cec..872cc96 100644
--- a/drivers/mtd/nand/fsl_ifc_nand.c
+++ b/drivers/mtd/nand/fsl_ifc_nand.c
@@ -821,6 +821,7 @@ 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:
diff --git a/drivers/mtd/nand/jz4740_nand.c b/drivers/mtd/nand/jz4740_nand.c
index e4147e8..a6fa884 100644
--- a/drivers/mtd/nand/jz4740_nand.c
+++ b/drivers/mtd/nand/jz4740_nand.c
@@ -332,11 +332,7 @@ static int __devinit jz_nand_probe(struct platform_device *pdev)
chip->ecc.mode = NAND_ECC_HW_OOB_FIRST;
chip->ecc.size = 512;
chip->ecc.bytes = 9;
- chip->ecc.strength = 2;
- /*
- * FIXME: ecc_strength value of 2 bits per 512 bytes of data is a
- * conservative guess, given 9 ecc bytes and reed-solomon alg.
- */
+ chip->ecc.strength = 4;
if (pdata)
chip->ecc.layout = pdata->ecc_layout;
More information about the linux-mtd-cvs
mailing list