[PATCH 1/4] arm: mach-meson: move reset_cpu to spl only
Neil Armstrong
neil.armstrong at linaro.org
Thu Apr 9 10:00:45 CEST 2026
On 4/8/26 22:30, 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, so move it to spl.c so it is only built for SPL.
>
> Signed-off-by: Ferass El Hafidi <funderscore at postmarketos.org>
> ---
> arch/arm/mach-meson/board-common.c | 14 --------------
> arch/arm/mach-meson/spl.c | 10 ++++++++++
> 2 files changed, 10 insertions(+), 14 deletions(-)
>
> diff --git a/arch/arm/mach-meson/board-common.c b/arch/arm/mach-meson/board-common.c
> index a5afc2d75c0..24dcafd30ac 100644
> --- a/arch/arm/mach-meson/board-common.c
> +++ b/arch/arm/mach-meson/board-common.c
> @@ -154,17 +154,3 @@ int board_late_init(void)
>
> return meson_board_late_init();
> }
> -
> -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
> -}
> diff --git a/arch/arm/mach-meson/spl.c b/arch/arm/mach-meson/spl.c
> index 28a63f39d36..ec566849667 100644
> --- a/arch/arm/mach-meson/spl.c
> +++ b/arch/arm/mach-meson/spl.c
> @@ -121,3 +121,13 @@ void board_init_f(ulong dummy)
> clrbits_32(GX_WDT_CTRL_REG, (1 << 18) | (1 << 25));
> #endif
> }
> +
> +void reset_cpu(void)
> +{
> + /*
> + * We do not have BL31 running yet, so no PSCI.
> + * Instead, let the watchdog reset the board.
> + */
> + for (;;)
> + ;
> +}
>
Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>
Thanks,
Neil
More information about the U-Boot
mailing list