From: Simon Glass Date: Sat, 16 Dec 2023 03:14:06 +0000 (-0700) Subject: m68k: Add a reset_cpu() function X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=79353aab15842d0ad8369cb0d1ada662899966b9;p=u-boot.git 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 Acked-by: Angelo Dureghello --- diff --git a/arch/m68k/lib/traps.c b/arch/m68k/lib/traps.c index c283351181..ae8ae6ccf5 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 #include #include #include @@ -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); +}