From: sbabic at denx.de Date: Sat, 16 Feb 2019 10:26:10 +0000 (UTC) Subject: [U-Boot] MTD: nand: mxs_nand: Allow driver to auto setup ECC in SPL In-Reply-To: <20190117131639.17339-1-aford173@gmail.com> Message-ID: <20190216102611.03EFAC21C38@lists.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de > 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. > Signed-off-by: Adam Ford > Tested-by: J=C3=B6rg Krause > Acked-by: Tim Harvey > Tested-by: Tim Harvey > diff --git a/drivers/mtd/nand/raw/mxs_nand.c b/drivers/mtd/nand/raw/mxs_n= and.c > index 2d84bfffe2..95fa452cef 100644 > --- a/drivers/mtd/nand/raw/mxs_nand.c > +++ b/drivers/mtd/nand/raw/mxs_nand.c > @@ -1191,9 +1191,6 @@ int mxs_nand_init_spl(struct nand_chip *nand) > nand->ecc.read_page =3D mxs_nand_ecc_read_page; > =20 > nand->ecc.mode =3D NAND_ECC_HW; > - nand->ecc.bytes =3D 9; > - nand->ecc.size =3D 512; > - nand->ecc.strength =3D 8; > =20 > return 0; > } Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D