[PATCH 1/4] stm32mp: stm32prog: support empty flashlayout
Patrice CHOTARD
patrice.chotard at foss.st.com
Fri Sep 23 14:01:14 CEST 2022
Hi Patrick
For the series: applied on u-boot-stm32/next
Thanks
Patrice
On 9/6/22 18:53, Patrick Delaunay wrote:
> When the STM32CubeProgrammer sent a empty flashlayout.tsv
> file, the command stm32prog correctly parse the file
> but data->dev_nb = 0 and the stm32prog_devices_init
> operations should be skipped.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay at foss.st.com>
> ---
>
> arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
> index c391b6c7abb..65e32288af7 100644
> --- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
> +++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
> @@ -1884,6 +1884,10 @@ static void stm32prog_devices_init(struct stm32prog_data *data)
> if (ret)
> goto error;
>
> + /* empty flashlayout */
> + if (!data->dev_nb)
> + return;
> +
> /* initialize the selected device */
> for (i = 0; i < data->dev_nb; i++) {
> ret = init_device(data, &data->dev[i]);
More information about the U-Boot
mailing list