[PATCH 1/4] arm: mach-meson: move reset_cpu to spl only
Ferass El Hafidi <[email protected]> Wed, 08 Apr 2026 20:30:12 +0000
| Newsgroups | io.groups.u-boot-amlogic,org.u-boot-project.lists.u-boot |
|---|---|
| Message-ID | <20260408-b4-amlogic-sysreset-capsules-v1-1-6f3386eb5124@postmarketos.org> |
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 <[email protected]> --- 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 (;;) + ; +} -- 2.53.0