]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sh4: move reset_cpu() from watchdog.c to cpu.c
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Tue, 28 May 2024 11:13:22 +0000 (13:13 +0200)
committerStefan Roese <sr@denx.de>
Sun, 16 Jun 2024 10:14:05 +0000 (12:14 +0200)
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 <iwamatsu@nigauri.org>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Stefan Roese <sr@denx.de>
arch/sh/cpu/sh4/cpu.c
arch/sh/cpu/sh4/watchdog.c

index b0ad685a91b12080a67b039efeba47759e088335..47a8549bebab18df9ce53ca8d071a590995280bb 100644 (file)
 #include <net.h>
 #include <netdev.h>
 #include <asm/processor.h>
+#include <asm/system.h>
+
+void reset_cpu(void)
+{
+       /* Address error with SR.BL=1 first. */
+       trigger_address_error();
+
+       while (1)
+               ;
+}
 
 int checkcpu(void)
 {
index c59743374657092ca07b6da0f2bbda2e434cb112..d394ac0b69be79af7fb8ec7053216419a9501ff8 100644 (file)
@@ -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)
-               ;
-}