diff mbox series

sunxi: Avoid duplicate reset_cpu with SYSRESET enabled

Message ID 20210822204945.44394-1-samuel@sholland.org
State Superseded, archived
Delegated to: Andre Przywara
Headers show
Series sunxi: Avoid duplicate reset_cpu with SYSRESET enabled | expand

Commit Message

Samuel Holland Aug. 22, 2021, 8:49 p.m. UTC
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(+)

Comments

Heinrich Schuchardt Oct. 27, 2021, 9:35 a.m. UTC | #1
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)
>
diff mbox series

Patch

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)