From: Simon Glass Date: Sat, 16 Dec 2023 03:14:05 +0000 (-0700) Subject: mips: Add a reset_cpu() function X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=4f4490a79e5aefee39300d7b0e04813e8baa3a54;p=u-boot.git mips: 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. Signed-off-by: Simon Glass --- diff --git a/arch/mips/cpu/cpu.c b/arch/mips/cpu/cpu.c index acfc9dc43f..4434650477 100644 --- a/arch/mips/cpu/cpu.c +++ b/arch/mips/cpu/cpu.c @@ -4,6 +4,7 @@ * Wolfgang Denk, DENX Software Engineering, */ +#include #include #include #include @@ -20,9 +21,14 @@ void __weak _machine_restart(void) /* NOP */; } -int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +void reset_cpu(void) { _machine_restart(); +} + +int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +{ + reset_cpu(); return 0; }