From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] mtd mxc_nand: move ecc strengh setup before nand_scan_tail
Date: Fri, 25 May 2012 16:22:42 +0200 [thread overview]
Message-ID: <1337955762-19157-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1337955762-19157-1-git-send-email-s.hauer@pengutronix.de>
Since this commit:
commit 6a918bade9dab40aaef80559bd1169c69e8d69cb
Author: Mike Dunn <mikedunn@newsguy.com>
Date: Sun Mar 11 14:21:11 2012 -0700
mtd: flash drivers set ecc strength
The mxc_nand driver fails with:
Driver must set ecc.strength when using hardware ECC
This is because nand_scan_tail checks for correct ecc strength
settings, so we must set them up before nand_scan_tail.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: stable at vger.kernel.org
---
drivers/mtd/nand/mxc_nand.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 4d27ddc..aaf042b 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -1485,12 +1485,6 @@ static int __init mxcnd_probe(struct platform_device *pdev)
else if (mtd->writesize == 4096)
this->ecc.layout = host->devtype_data->ecclayout_4k;
- /* second phase scan */
- if (nand_scan_tail(mtd)) {
- err = -ENXIO;
- goto escan;
- }
-
if (this->ecc.mode == NAND_ECC_HW) {
if (nfc_is_v1())
this->ecc.strength = 1;
@@ -1498,6 +1492,12 @@ static int __init mxcnd_probe(struct platform_device *pdev)
this->ecc.strength = (host->eccsize == 4) ? 4 : 8;
}
+ /* second phase scan */
+ if (nand_scan_tail(mtd)) {
+ err = -ENXIO;
+ goto escan;
+ }
+
/* Register the partitions */
mtd_device_parse_register(mtd, part_probes,
&(struct mtd_part_parser_data){
--
1.7.10
next prev parent reply other threads:[~2012-05-25 14:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-25 14:22 [PATCH 1/2] mtd mxc_nand: use 32bit copy functions Sascha Hauer
2012-05-25 14:22 ` Sascha Hauer [this message]
2012-05-25 16:29 ` [PATCH 2/2] mtd mxc_nand: move ecc strengh setup before nand_scan_tail Mike Dunn
2012-05-25 16:55 ` Artem Bityutskiy
2012-05-25 14:58 ` [PATCH 1/2] mtd mxc_nand: use 32bit copy functions Artem Bityutskiy
2012-05-25 14:59 ` Sascha Hauer
2012-06-29 11:34 ` Artem Bityutskiy
2012-06-27 17:52 ` Uwe Kleine-König
2012-06-29 11:25 ` Artem Bityutskiy
2012-06-29 11:28 ` Uwe Kleine-König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337955762-19157-2-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).