All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: fsl_ifc_nand: fix eccstrength for ecc8
@ 2013-05-28 23:45 Scott Wood
  2013-05-29 18:14 ` Mike Dunn
  0 siblings, 1 reply; 2+ messages in thread
From: Scott Wood @ 2013-05-28 23:45 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd, prabhakar

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

Signed-off-by: Scott Wood <scottwood@freescale.com>
---
 drivers/mtd/nand/fsl_ifc_nand.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c
index f1f7f12..3469e5d 100644
--- a/drivers/mtd/nand/fsl_ifc_nand.c
+++ b/drivers/mtd/nand/fsl_ifc_nand.c
@@ -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;
 		}
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: fsl_ifc_nand: fix eccstrength for ecc8
  2013-05-28 23:45 [PATCH] mtd: fsl_ifc_nand: fix eccstrength for ecc8 Scott Wood
@ 2013-05-29 18:14 ` Mike Dunn
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Dunn @ 2013-05-29 18:14 UTC (permalink / raw)
  To: Scott Wood; +Cc: linux-mtd, David Woodhouse, prabhakar

On 05/28/2013 04:45 PM, Scott Wood wrote:
> Commit 44df4d11b8f573e9efcba94d63e6a1ad148c76d0 ("mtd: nand: fix
> incorrect ecc strength values") set eccstrength to 4 for IFC, but it is
> 8 in one configuration.
> 
> Signed-off-by: Scott Wood <scottwood@freescale.com>


Acked-by: Mike Dunn <mikedunn@newsguy.com>

Missed that... Sorry about that Scott.

Thanks,
Mike

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-29 18:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-28 23:45 [PATCH] mtd: fsl_ifc_nand: fix eccstrength for ecc8 Scott Wood
2013-05-29 18:14 ` Mike Dunn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.