[PATCH v3 1/4] arm: mach-meson: provide reset_cpu only when SYSRESET is disabled

Neil Armstrong neil.armstrong at linaro.org
Wed Apr 22 18:26:33 CEST 2026


On 4/22/26 17:43, Ferass El Hafidi wrote:
> This is in preparation of enabling SYSRESET across all Amlogic boards by
> default. SYSRESET brings its own reset_cpu implementation which will
> conflict with the one defined in board-common.c.
> SPL however will not have SYSRESET enabled (due to overhead in the final
> image, as we have very little space to work with), and thus will still
> need that reset_cpu to be defined. Furthermore, some boards do not enable
> PSCI support in U-Boot, so they may still need this implementation.
> Guard reset_cpu inside #ifdef to only compile it in when SYSRESET is not
> enabled.
> 
> Signed-off-by: Ferass El Hafidi <funderscore at postmarketos.org>
> ---
>   arch/arm/mach-meson/board-common.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-meson/board-common.c b/arch/arm/mach-meson/board-common.c
> index a5afc2d75c0..c34b81e5e78 100644
> --- a/arch/arm/mach-meson/board-common.c
> +++ b/arch/arm/mach-meson/board-common.c
> @@ -155,16 +155,14 @@ int board_late_init(void)
>   	return meson_board_late_init();
>   }
>   
> +#if defined(CONFIG_XPL) || !CONFIG_IS_ENABLED(SYSRESET)
>   void reset_cpu(void)
>   {
> -#if CONFIG_SPL_BUILD
>   	/*
>   	 * We do not have BL31 running yet, so no PSCI.
>   	 * Instead, let the watchdog reset the board.
>   	 */
>   	for (;;)
>   		;
> -#else
> -	psci_system_reset();
> -#endif
>   }
> +#endif
> 

Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>

Thanks,
Neil


More information about the U-Boot mailing list