[PATCH v2 2/3] colibri-imx7: specify MTD partitions on command line

Dario Binacchi dario.binacchi at amarulasolutions.com
Mon Apr 17 11:21:23 CEST 2023


> Disable fdt_fixup_mtdparts() and pass MTD partition on the command
> line. Dynamically editing the fdt with a static partitions configuration
> is not required and there is no advantages compared to using the command
> line. This change should prevent boot failures as the one in [0].
>
> Cc: Marek Vasut <marex at denx.de>
> Cc: Miquel Raynal <miquel.raynal at bootlin.com>
> Link: https://lore.kernel.org/all/Y4dgBTGNWpM6SQXI@francesco-nb.int.toradex.com/ [0]
> Link: https://lore.kernel.org/all/20230105123334.7f90c289@xps-13/
> Signed-off-by: Francesco Dolcini <francesco.dolcini at toradex.com>
> ---
> v2:
>  - improved commit message
>  - removed dead code
> ---
>  board/toradex/colibri_imx7/colibri_imx7.c | 10 ----------
>  configs/colibri_imx7_defconfig            |  1 -
>  include/configs/colibri_imx7.h            |  2 +-
>  3 files changed, 1 insertion(+), 12 deletions(-)

> diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c
> index 6ce4fa376ac0..3e79ab93a982 100644
> --- a/board/toradex/colibri_imx7/colibri_imx7.c
> +++ b/board/toradex/colibri_imx7/colibri_imx7.c
> @@ -303,16 +303,6 @@ int ft_board_setup(void *blob, struct bd_info *bd)
>  			fdt_status_disabled(blob, off);
>  	}
>  #endif
> -#if defined(CONFIG_FDT_FIXUP_PARTITIONS)
> -	static const struct node_info nodes[] = {
> -		{ "fsl,imx7d-gpmi-nand", MTD_DEV_TYPE_NAND, }, /* NAND flash */
> -		{ "fsl,imx6q-gpmi-nand", MTD_DEV_TYPE_NAND, },
> -	};
> -
> -	/* Update partition nodes using info from mtdparts env var */
> -	puts("   Updating MTD partitions...\n");
> -	fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
> -#endif
 
>  	return ft_common_board_setup(blob, bd);
>  }
> diff --git a/configs/colibri_imx7_defconfig b/configs/colibri_imx7_defconfig
> index 7e24dcd40090..5cc22a481dd9 100644
> --- a/configs/colibri_imx7_defconfig
> +++ b/configs/colibri_imx7_defconfig
> @@ -101,4 +101,3 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x4000
>  CONFIG_CI_UDC=y
>  CONFIG_USB_GADGET_DOWNLOAD=y
>  CONFIG_OF_LIBFDT_OVERLAY=y
> -CONFIG_FDT_FIXUP_PARTITIONS=y
> diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h
> index c568643977ca..03f8ed14787a 100644
> --- a/include/configs/colibri_imx7.h
> +++ b/include/configs/colibri_imx7.h
> @@ -141,7 +141,7 @@
>  		"${board}/flash_blk.img && source ${loadaddr}\0" \
>  	"setup=setenv setupargs " \
>  		"console=tty1 console=${console}" \
> -		",${baudrate}n8 ${memargs} consoleblank=0\0" \
> +		",${baudrate}n8 ${memargs} ${mtdparts} consoleblank=0\0" \
>  	"setupdate=run setsdupdate || run setusbupdate || run setethupdate\0" \
>  	"setusbupdate=usb start && setenv interface usb && " \
>  		"fatload ${interface} 0:1 ${loadaddr} " \
> -- 
> 2.25.1

Applied to nand-next,
thanks and regards,

Dario Binacchi


More information about the U-Boot mailing list