aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSimon Glass2023-12-15 20:14:06 -0700
committerTom Rini2023-12-21 16:07:52 -0500
commit79353aab15842d0ad8369cb0d1ada662899966b9 (patch)
tree1a0d28bd54db8280fba644e13a01eafa979c1888 /arch
parent4f4490a79e5aefee39300d7b0e04813e8baa3a54 (diff)
m68k: Add a reset_cpu() function
The current do_reset() is called from a command context. Add a function which can be used from anywhere, as is done on ARM. Since there are lots of reset functions, this one actually just calls do_reset(). Future refactoring could correct this. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Angelo Dureghello <angelo@kernel-spcece.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/m68k/lib/traps.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/m68k/lib/traps.c b/arch/m68k/lib/traps.c
index c283351181d..ae8ae6ccf59 100644
--- a/arch/m68k/lib/traps.c
+++ b/arch/m68k/lib/traps.c
@@ -7,6 +7,7 @@
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*/
+#include <cpu_func.h>
#include <init.h>
#include <watchdog.h>
#include <command.h>
@@ -65,3 +66,9 @@ int arch_initr_trap(void)
return 0;
}
+
+void reset_cpu(void)
+{
+ /* TODO: Refactor all the do_reset calls to be reset_cpu() instead */
+ do_reset(NULL, 0, 0, NULL);
+}