diff mbox series

exynos: Avoid duplicate reset_cpu with SYSRESET enabled

Message ID 20231030165502.27813-1-semen.protsenko@linaro.org
State Accepted
Commit 08cfa971a717ff6aedf52066efb9e227eaa7aac4
Headers show
Series exynos: Avoid duplicate reset_cpu with SYSRESET enabled | expand

Commit Message

Sam Protsenko Oct. 30, 2023, 4:55 p.m. UTC
The sysreset uclass unconditionally provides a definition of the
reset_cpu() function. So does the exynos soc code. Fix the build with
SYSRESET enabled by omitting the function from the soc code in that
case. The code still needs to be kept around for use in SPL.

This commit was inspired by commit 6e19dc84c14b ("sunxi: Avoid duplicate
reset_cpu with SYSRESET enabled").

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
---
 arch/arm/mach-exynos/soc.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Tom Rini Oct. 30, 2023, 5:25 p.m. UTC | #1
On Mon, Oct 30, 2023 at 11:55:02AM -0500, Sam Protsenko wrote:

> The sysreset uclass unconditionally provides a definition of the
> reset_cpu() function. So does the exynos soc code. Fix the build with
> SYSRESET enabled by omitting the function from the soc code in that
> case. The code still needs to be kept around for use in SPL.
> 
> This commit was inspired by commit 6e19dc84c14b ("sunxi: Avoid duplicate
> reset_cpu with SYSRESET enabled").
> 
> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>

Reviewed-by: Tom Rini <trini@konsulko.com>
Minkyu Kang Nov. 14, 2023, 10:41 a.m. UTC | #2
Hi,


2023년 10월 31일 (화) 02:36, Tom Rini <trini@konsulko.com>님이 작성:

> On Mon, Oct 30, 2023 at 11:55:02AM -0500, Sam Protsenko wrote:
>
> > The sysreset uclass unconditionally provides a definition of the
> > reset_cpu() function. So does the exynos soc code. Fix the build with
> > SYSRESET enabled by omitting the function from the soc code in that
> > case. The code still needs to be kept around for use in SPL.
> >
> > This commit was inspired by commit 6e19dc84c14b ("sunxi: Avoid duplicate
> > reset_cpu with SYSRESET enabled").
> >
> > Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
>
> Reviewed-by: Tom Rini <trini@konsulko.com>
>
> --
> Tom


applied to u-boot-samsung.

Thanks.
Minkyu Kang.
diff mbox series

Patch

diff --git a/arch/arm/mach-exynos/soc.c b/arch/arm/mach-exynos/soc.c
index 6fe61cf9288d..aff2b5e1b6e8 100644
--- a/arch/arm/mach-exynos/soc.c
+++ b/arch/arm/mach-exynos/soc.c
@@ -21,12 +21,14 @@  extern void _main(void);
 void *secondary_boot_addr = (void *)_main;
 #endif /* CONFIG_TARGET_ESPRESSO7420 */
 
+#if !CONFIG_IS_ENABLED(SYSRESET)
 void reset_cpu(void)
 {
 #ifdef CONFIG_CPU_V7A
 	writel(0x1, samsung_get_base_swreset());
 #endif
 }
+#endif
 
 #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
 void enable_caches(void)