From: Rasmus Villemoes Date: Tue, 28 May 2024 11:13:22 +0000 (+0200) Subject: sh4: move reset_cpu() from watchdog.c to cpu.c X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=167f841ed44ea0e09f1f24d1eb66aa4fd84ffa15;p=u-boot.git sh4: move reset_cpu() from watchdog.c to cpu.c The next patch will remove all the other code from watchdog.c, which would leave just this function in there. It seems just as natural for this function to be defined in cpu.c, allowing us to delete watchdog.c completely. Cc: Nobuhiro Iwamatsu Signed-off-by: Rasmus Villemoes Reviewed-by: Stefan Roese --- diff --git a/arch/sh/cpu/sh4/cpu.c b/arch/sh/cpu/sh4/cpu.c index b0ad685a91..47a8549beb 100644 --- a/arch/sh/cpu/sh4/cpu.c +++ b/arch/sh/cpu/sh4/cpu.c @@ -10,6 +10,16 @@ #include #include #include +#include + +void reset_cpu(void) +{ + /* Address error with SR.BL=1 first. */ + trigger_address_error(); + + while (1) + ; +} int checkcpu(void) { diff --git a/arch/sh/cpu/sh4/watchdog.c b/arch/sh/cpu/sh4/watchdog.c index c597433746..d394ac0b69 100644 --- a/arch/sh/cpu/sh4/watchdog.c +++ b/arch/sh/cpu/sh4/watchdog.c @@ -49,12 +49,3 @@ int watchdog_disable(void) return 0; } #endif - -void reset_cpu(void) -{ - /* Address error with SR.BL=1 first. */ - trigger_address_error(); - - while (1) - ; -}