sunxi: Avoid duplicate reset_cpu with SYSRESET enabled
Subsystems (3)
Samuel Holland
maintainerPATCH 1/1 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 <[email protected]>
---
arch/arm/mach-sunxi/board.c | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/mach-sunxi/board.c +2 -0
@@ -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 )
Signature · 1 line
2.31.1
Quoted 6 lines · Samuel Holland
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 <[email protected]>
Reviewed-by Heinrich Schuchardt <[email protected]>
Quoted 26 lines
---
arch/arm/mach-sunxi/board.c | 2 ++ 1 file changed, 2 insertions(+)arch/arm/mach-sunxi/board.c +2
-0@@ -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 )