Commit 44df4d11 authored by Mike Dunn's avatar Mike Dunn Committed by David Woodhouse

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.htmlSigned-off-by: default avatarMike Dunn <mikedunn@newsguy.com>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 86c2072b
...@@ -476,12 +476,7 @@ static int __devinit bcm_umi_nand_probe(struct platform_device *pdev) ...@@ -476,12 +476,7 @@ static int __devinit bcm_umi_nand_probe(struct platform_device *pdev)
this->badblock_pattern = &largepage_bbt; this->badblock_pattern = &largepage_bbt;
} }
/* this->ecc.strength = 8;
* 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;
#endif #endif
......
...@@ -821,6 +821,7 @@ static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv) ...@@ -821,6 +821,7 @@ static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv)
/* Hardware generates ECC per 512 Bytes */ /* Hardware generates ECC per 512 Bytes */
chip->ecc.size = 512; chip->ecc.size = 512;
chip->ecc.bytes = 8; chip->ecc.bytes = 8;
chip->ecc.strength = 4;
switch (csor & CSOR_NAND_PGS_MASK) { switch (csor & CSOR_NAND_PGS_MASK) {
case CSOR_NAND_PGS_512: case CSOR_NAND_PGS_512:
......
...@@ -332,11 +332,7 @@ static int __devinit jz_nand_probe(struct platform_device *pdev) ...@@ -332,11 +332,7 @@ static int __devinit jz_nand_probe(struct platform_device *pdev)
chip->ecc.mode = NAND_ECC_HW_OOB_FIRST; chip->ecc.mode = NAND_ECC_HW_OOB_FIRST;
chip->ecc.size = 512; chip->ecc.size = 512;
chip->ecc.bytes = 9; chip->ecc.bytes = 9;
chip->ecc.strength = 2; chip->ecc.strength = 4;
/*
* FIXME: ecc_strength value of 2 bits per 512 bytes of data is a
* conservative guess, given 9 ecc bytes and reed-solomon alg.
*/
if (pdata) if (pdata)
chip->ecc.layout = pdata->ecc_layout; chip->ecc.layout = pdata->ecc_layout;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment