]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
arm: mach-meson: provide reset_cpu only when SYSRESET is disabled
authorFerass El Hafidi <funderscore@postmarketos.org>
Wed, 22 Apr 2026 15:43:23 +0000 (15:43 +0000)
committerNeil Armstrong <neil.armstrong@linaro.org>
Wed, 22 Apr 2026 16:27:26 +0000 (18:27 +0200)
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@postmarketos.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260422-b4-amlogic-sysreset-capsules-v3-1-07b5ccc8f552@postmarketos.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
arch/arm/mach-meson/board-common.c

index a5afc2d75c098b4c3b08908c507f64f8269374e8..c34b81e5e782798777b5faa906a4b12670e3c9aa 100644 (file)
@@ -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