[U-Boot] [PATCH v1 2/2] gpio: stm32f7: Fix SPL code size

Marek Vasut marex at denx.de
Tue Mar 31 04:51:42 CEST 2020


On 1/4/19 10:55 AM, Patrice Chotard wrote:

Hi,

> @@ -215,7 +220,9 @@ U_BOOT_DRIVER(gpio_stm32) = {
>  	.id	= UCLASS_GPIO,
>  	.of_match = stm32_gpio_ids,
>  	.probe	= gpio_stm32_probe,
> +#ifndef CONFIG_SPL_BUILD
>  	.ops	= &gpio_stm32_ops,
> +#endif
>  	.flags	= DM_UC_FLAG_SEQ_ALIAS,
>  	.priv_auto_alloc_size	= sizeof(struct stm32_gpio_priv),
>  };

The U-Boot DM GPIO uclass code assumes the .ops is always non-NULL.
Hence, this patch breaks all GPIO access (actually crashes SPL) on STM32
in SPL.

-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list