[U-Boot] MTD: nand: mxs_nand_spl: Fix empty function pointer for BBT

sbabic at denx.de sbabic at denx.de
Wed Jan 30 08:57:03 UTC 2019


> The initialization function calls a nand_chip.scan_bbt(mtd) but
> scan_bbt is never initialized resulting in an undefined function
> pointer.  This will direct the function pointer to nand_default_bbt
> defined in the same file.
> Signed-off-by: Adam Ford <aford173 at gmail.com>
> Acked-by: Stefan Agner <stefan.agner at toradex.com>
> diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c
> index 2d7bbe83cc..c628f3adec 100644
> --- a/drivers/mtd/nand/raw/mxs_nand_spl.c
> +++ b/drivers/mtd/nand/raw/mxs_nand_spl.c
> @@ -185,6 +185,7 @@ static int mxs_nand_init(void)
>  	mtd = nand_to_mtd(&nand_chip);
>  	/* set mtd functions */
>  	nand_chip.cmdfunc = mxs_nand_command;
> +	nand_chip.scan_bbt = nand_default_bbt;
>  	nand_chip.numchips = 1;
>  
>  	/* identify flash device */

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