From 167f841ed44ea0e09f1f24d1eb66aa4fd84ffa15 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Tue, 28 May 2024 13:13:22 +0200 Subject: [PATCH] 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 --- arch/sh/cpu/sh4/cpu.c | 10 ++++++++++ arch/sh/cpu/sh4/watchdog.c | 9 --------- 2 files changed, 10 insertions(+), 9 deletions(-) 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) - ; -} -- 2.39.5