From patchwork Tue May 28 23:45:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 247057 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1A3302C033F for ; Wed, 29 May 2013 09:46:46 +1000 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UhTb3-0007aH-LE; Tue, 28 May 2013 23:46:29 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UhTb1-0000wd-Ji; Tue, 28 May 2013 23:46:27 +0000 Received: from va3ehsobe004.messaging.microsoft.com ([216.32.180.14] helo=va3outboundpool.messaging.microsoft.com) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UhTay-0000vz-O0 for linux-mtd@lists.infradead.org; Tue, 28 May 2013 23:46:25 +0000 Received: from mail42-va3-R.bigfish.com (10.7.14.235) by VA3EHSOBE011.bigfish.com (10.7.40.61) with Microsoft SMTP Server id 14.1.225.23; Tue, 28 May 2013 23:45:57 +0000 Received: from mail42-va3 (localhost [127.0.0.1]) by mail42-va3-R.bigfish.com (Postfix) with ESMTP id D8795420067; Tue, 28 May 2013 23:45:57 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1f42h1ee6h1de0h1fdah1202h1e76h1d1ah1d2ah1fc6hzz8275bhz2dh2a8h668h839h944hd25hf0ah1220h1288h12a5h12a9h12bdh137ah13b6h1441h14ddh1504h1537h153bh162dh1631h1758h18e1h1946h19b5h1ad9h1b0ah1d0ch1d2eh1d3fh1dc1h1155h) Received: from mail42-va3 (localhost.localdomain [127.0.0.1]) by mail42-va3 (MessageSwitch) id 1369784738837512_3136; Tue, 28 May 2013 23:45:38 +0000 (UTC) Received: from VA3EHSMHS012.bigfish.com (unknown [10.7.14.241]) by mail42-va3.bigfish.com (Postfix) with ESMTP id C196E40064; Tue, 28 May 2013 23:45:38 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS012.bigfish.com (10.7.99.22) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 28 May 2013 23:45:38 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server (TLS) id 14.2.328.11; Tue, 28 May 2013 23:46:34 +0000 Received: from home.buserror.net ([10.214.80.128]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id r4SNjYdt011115; Tue, 28 May 2013 16:45:37 -0700 Date: Tue, 28 May 2013 18:45:34 -0500 From: Scott Wood To: David Woodhouse Subject: [PATCH] mtd: fsl_ifc_nand: fix eccstrength for ecc8 Message-ID: <20130528234534.GA22340@home.buserror.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginatorOrg: freescale.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130528_194624_853087_C05A91A9 X-CRM114-Status: GOOD ( 10.59 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [216.32.180.14 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-mtd@lists.infradead.org, prabhakar@freescale.com X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 Acked-by: Mike Dunn --- 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; }