aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>2024-05-28 13:13:22 +0200
committerStefan Roese <sr@denx.de>2024-06-16 12:14:05 +0200
commit167f841ed44ea0e09f1f24d1eb66aa4fd84ffa15 (patch)
tree3d41e75baa6e0399bda88ea293e15f2e7459d4fc
parent945fc278226cf2de432ac9ccf56b23520300afce (diff)
downloadu-boot-167f841ed44ea0e09f1f24d1eb66aa4fd84ffa15.tar.gz
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 <iwamatsu@nigauri.org> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Stefan Roese <sr@denx.de>
-rw-r--r--arch/sh/cpu/sh4/cpu.c10
-rw-r--r--arch/sh/cpu/sh4/watchdog.c9
2 files changed, 10 insertions, 9 deletions
diff --git a/arch/sh/cpu/sh4/cpu.c b/arch/sh/cpu/sh4/cpu.c
index b0ad685a91b..47a8549beba 100644
--- a/arch/sh/cpu/sh4/cpu.c
+++ b/arch/sh/cpu/sh4/cpu.c
@@ -10,6 +10,16 @@
#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)
{
diff --git a/arch/sh/cpu/sh4/watchdog.c b/arch/sh/cpu/sh4/watchdog.c
index c5974337465..d394ac0b69b 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)
- ;
-}