[U-Boot] MTD: nand: mxs_nand: Allow driver to auto setup ECC in SPL

sbabic at denx.de sbabic at denx.de
Sat Feb 16 10:26:10 UTC 2019


> 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 <aford173 at gmail.com>
> Tested-by: Jörg Krause <joerg.krause at embedded.rocks>
> Acked-by: Tim Harvey <tharvey at gateworks.com>
> Tested-by: Tim Harvey <tharvey at gateworks.com>
> diff --git a/drivers/mtd/nand/raw/mxs_nand.c b/drivers/mtd/nand/raw/mxs_nand.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	= 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;
>  }

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
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
=====================================================================



More information about the U-Boot mailing list