From 72912a48f11b1c2a581db76f4a41eb51599c5da3 Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Thu, 17 Jan 2019 07:16:39 -0600 Subject: [PATCH] UPSTREAM: MTD: nand: mxs_nand: Allow driver to auto setup ECC in SPL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The initialization of the NAND in SPL hard-coded ecc.bytes, ecc.size, and ecc.strength which may work for some NAND parts, but it not appropriate for others. With the pending patch "mxs_nand: Fix BCH read timeout error on boards requiring ECC" the driver can auto configure the ECC when these entries are blank. This patch has been tested in NAND flash with oob 64 and oob 128. Change-Id: Iaa9d322e8b39bbde309993e9bb9cb53cd920e80c Signed-off-by: Adam Ford Tested-by: Jörg Krause Acked-by: Tim Harvey Tested-by: Tim Harvey Signed-off-by: Jon Lin (cherry picked from commit 04568bd0b6d673a325eed76bd857a9cbd0c556bc) --- drivers/mtd/nand/raw/mxs_nand.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/mtd/nand/raw/mxs_nand.c b/drivers/mtd/nand/raw/mxs_nand.c index 66f34c8824..bb7a627aa4 100644 --- a/drivers/mtd/nand/raw/mxs_nand.c +++ b/drivers/mtd/nand/raw/mxs_nand.c @@ -1192,9 +1192,6 @@ int mxs_nand_init_spl(struct nand_chip *nand) nand->ecc.read_page = mxs_nand_ecc_read_page; nand->ecc.mode = NAND_ECC_HW; - nand->ecc.bytes = 9; - nand->ecc.size = 512; - nand->ecc.strength = 8; return 0; }