diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-05-25 16:22:42 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-10 00:36:13 +0900 |
commit | 1e98ce80a4493f32b44f227d6050318462ca9d5d (patch) | |
tree | 3dabc727f043859a7045569ccc5a2b939fb5774a /drivers/mtd/nand | |
parent | 29924c0318327d0444e0317587faf4a0693527a8 (diff) | |
download | linux-3.10-1e98ce80a4493f32b44f227d6050318462ca9d5d.tar.gz linux-3.10-1e98ce80a4493f32b44f227d6050318462ca9d5d.tar.bz2 linux-3.10-1e98ce80a4493f32b44f227d6050318462ca9d5d.zip |
mtd: mxc_nand: move ecc strengh setup before nand_scan_tail
commit 4a43faf54e9173b6acce37cf7f053fc9515a2cdf upstream.
Since commit 6a918bade9dab40aaef80559bd1169c69e8d69cb, 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>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/mxc_nand.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index cc0678a967c..6f87c7464ec 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c @@ -1219,12 +1219,6 @@ static int __init mxcnd_probe(struct platform_device *pdev) if (nfc_is_v21() && mtd->writesize == 4096) this->ecc.layout = &nandv2_hw_eccoob_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; @@ -1232,6 +1226,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, NULL, pdata->parts, pdata->nr_parts); |