aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv/lib/reset.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-12-15 20:14:09 -0700
committerTom Rini <trini@konsulko.com>2023-12-21 16:07:52 -0500
commitc35bfd07ecdf683b6a80132f5ac6201d6d24c734 (patch)
treed00be7eca01d4cff388fff7de1bee09e00794f6d /arch/riscv/lib/reset.c
parent6557eb73d65428cd1364c823c85fe3e4f8736deb (diff)
riscv: 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. Adjust do_reset() to call it. Note that reset_cpu() is normally provided by SYSRESET so make this declaration conditional on that being disabled. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Chanho Park <chanho61.park@samsung.com> Tested-by: Chanho Park <chanho61.park@samsung.com>
Diffstat (limited to 'arch/riscv/lib/reset.c')
-rw-r--r--arch/riscv/lib/reset.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/riscv/lib/reset.c b/arch/riscv/lib/reset.c
index 712e1bdb8e..c4153c9e6e 100644
--- a/arch/riscv/lib/reset.c
+++ b/arch/riscv/lib/reset.c
@@ -4,14 +4,11 @@
*/
#include <command.h>
-#include <hang.h>
+#include <cpu_func.h>
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- printf("resetting ...\n");
-
- printf("reset not supported yet\n");
- hang();
+ reset_cpu();
return 0;
}