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>
This commit is contained in:
parent
225fd8c5d4
commit
1c90369437
|
@ -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;
|
||||
}
|
||||
|
||||
host->pagesize_2k = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue