[PATCH] sunxi: Avoid duplicate reset_cpu with SYSRESET enabled

The sysreset uclass unconditionally provides a definition of the reset_cpu() function. So does the sunxi board code. Omit our definition when SYSRESET is enabled. This allows the build to succeed, even though sysreset may not yet be functional due to a lack of back-end drivers.
Signed-off-by: Samuel Holland samuel@sholland.org ---
arch/arm/mach-sunxi/board.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c index d9b04f75fc4..f867a28c30c 100644 --- a/arch/arm/mach-sunxi/board.c +++ b/arch/arm/mach-sunxi/board.c @@ -347,6 +347,7 @@ void board_init_f(ulong dummy) } #endif
+#if !CONFIG_IS_ENABLED(SYSRESET) void reset_cpu(void) { #if defined(CONFIG_SUNXI_GEN_SUN4I) || defined(CONFIG_MACH_SUN8I_R40) @@ -377,6 +378,7 @@ void reset_cpu(void) while (1) { } #endif } +#endif
#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) && !defined(CONFIG_ARM64) void enable_caches(void)

On 8/22/21 22:49, Samuel Holland wrote:
The sysreset uclass unconditionally provides a definition of the reset_cpu() function. So does the sunxi board code. Omit our definition when SYSRESET is enabled. This allows the build to succeed, even though sysreset may not yet be functional due to a lack of back-end drivers.
Signed-off-by: Samuel Holland samuel@sholland.org
Reviewed-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
arch/arm/mach-sunxi/board.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c index d9b04f75fc4..f867a28c30c 100644 --- a/arch/arm/mach-sunxi/board.c +++ b/arch/arm/mach-sunxi/board.c @@ -347,6 +347,7 @@ void board_init_f(ulong dummy) } #endif
+#if !CONFIG_IS_ENABLED(SYSRESET) void reset_cpu(void) { #if defined(CONFIG_SUNXI_GEN_SUN4I) || defined(CONFIG_MACH_SUN8I_R40) @@ -377,6 +378,7 @@ void reset_cpu(void) while (1) { } #endif } +#endif
#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) && !defined(CONFIG_ARM64) void enable_caches(void)
participants (2)
-
Heinrich Schuchardt
-
Samuel Holland