diff options
author | Marek Vasut <marex@denx.de> | 2013-07-03 02:34:34 +0200 |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2013-07-12 16:12:33 -0500 |
commit | 1c903694370259738abccc67ff0d6e5eaf7886f9 (patch) | |
tree | b6171ed526871e6ebe3dd8a0c75417f8476d58f4 /drivers | |
parent | 225fd8c5d4556547896a5d32ee092a258f3df638 (diff) | |
download | u-boot-1c903694370259738abccc67ff0d6e5eaf7886f9.tar.gz |
mtd: mxc_nand: Fix crash after MTD resync
The driver triggered a BUG() in nand_base.c:3214/nand_scan_tail()
because the ecc.strength was not set in NAND_ECC_HW_SYNDROME ECC
mode.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Benoit Thebaudeau <benoit.thebaudeau@advansee.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/nand/mxc_nand.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index ac435f2050..40b0741f6a 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c @@ -1242,12 +1242,10 @@ int board_nand_init(struct nand_chip *this) this->ecc.mode = NAND_ECC_HW; } - if (this->ecc.mode == NAND_ECC_HW) { - if (is_mxc_nfc_1()) - this->ecc.strength = 1; - else - this->ecc.strength = 4; - } + if (is_mxc_nfc_1()) + this->ecc.strength = 1; + else + this->ecc.strength = 4; host->pagesize_2k = 0; |