diff options
author | Simon Glass <sjg@chromium.org> | 2023-12-15 20:14:05 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-12-21 16:07:52 -0500 |
commit | 4f4490a79e5aefee39300d7b0e04813e8baa3a54 (patch) | |
tree | 92896323517efbe2876fec47748811beed153bd0 | |
parent | a213289953addc09fe35b2ddf34e1cfb51cff697 (diff) | |
download | u-boot-4f4490a79e5aefee39300d7b0e04813e8baa3a54.zip u-boot-4f4490a79e5aefee39300d7b0e04813e8baa3a54.tar.gz u-boot-4f4490a79e5aefee39300d7b0e04813e8baa3a54.tar.bz2 |
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 <sjg@chromium.org>
-rw-r--r-- | arch/mips/cpu/cpu.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/mips/cpu/cpu.c b/arch/mips/cpu/cpu.c index acfc9dc..4434650 100644 --- a/arch/mips/cpu/cpu.c +++ b/arch/mips/cpu/cpu.c @@ -4,6 +4,7 @@ * Wolfgang Denk, DENX Software Engineering, <wd@denx.de> */ +#include <cpu_func.h> #include <command.h> #include <init.h> #include <linux/compiler.h> @@ -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; } |