diff options
author | Mike Dunn <mikedunn@newsguy.com> | 2012-04-25 15:06:06 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-05-14 00:10:28 -0400 |
commit | 44df4d11b8f573e9efcba94d63e6a1ad148c76d0 (patch) | |
tree | 6713b355ae651799df014eeeae864ca82bdf8963 /drivers | |
parent | 86c2072be6f3c2150cc35f00233f2c31bdba2745 (diff) |
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@newsguy.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/nand/bcm_umi_nand.c | 7 | ||||
-rw-r--r-- | drivers/mtd/nand/fsl_ifc_nand.c | 1 | ||||
-rw-r--r-- | 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 6908cdde3065..7134adfa1089 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) | |||
476 | this->badblock_pattern = &largepage_bbt; | 476 | this->badblock_pattern = &largepage_bbt; |
477 | } | 477 | } |
478 | 478 | ||
479 | /* | 479 | this->ecc.strength = 8; |
480 | * FIXME: ecc strength value of 6 bits per 512 bytes of data is a | ||
481 | * conservative guess, given 13 ecc bytes and using bch alg. | ||
482 | * (Assume Galois field order m=15 to allow a margin of error.) | ||
483 | */ | ||
484 | this->ecc.strength = 6; | ||
485 | 480 | ||
486 | #endif | 481 | #endif |
487 | 482 | ||
diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c index 5387cec53c9a..872cc9605291 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) | |||
821 | /* Hardware generates ECC per 512 Bytes */ | 821 | /* Hardware generates ECC per 512 Bytes */ |
822 | chip->ecc.size = 512; | 822 | chip->ecc.size = 512; |
823 | chip->ecc.bytes = 8; | 823 | chip->ecc.bytes = 8; |
824 | chip->ecc.strength = 4; | ||
824 | 825 | ||
825 | switch (csor & CSOR_NAND_PGS_MASK) { | 826 | switch (csor & CSOR_NAND_PGS_MASK) { |
826 | case CSOR_NAND_PGS_512: | 827 | case CSOR_NAND_PGS_512: |
diff --git a/drivers/mtd/nand/jz4740_nand.c b/drivers/mtd/nand/jz4740_nand.c index e4147e8acb7c..a6fa884ae49b 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) | |||
332 | chip->ecc.mode = NAND_ECC_HW_OOB_FIRST; | 332 | chip->ecc.mode = NAND_ECC_HW_OOB_FIRST; |
333 | chip->ecc.size = 512; | 333 | chip->ecc.size = 512; |
334 | chip->ecc.bytes = 9; | 334 | chip->ecc.bytes = 9; |
335 | chip->ecc.strength = 2; | 335 | chip->ecc.strength = 4; |
336 | /* | ||
337 | * FIXME: ecc_strength value of 2 bits per 512 bytes of data is a | ||
338 | * conservative guess, given 9 ecc bytes and reed-solomon alg. | ||
339 | */ | ||
340 | 336 | ||
341 | if (pdata) | 337 | if (pdata) |
342 | chip->ecc.layout = pdata->ecc_layout; | 338 | chip->ecc.layout = pdata->ecc_layout; |