]> git.dujemihanovic.xyz Git - u-boot.git/commit
riscv: Add a reset_cpu() function
authorSimon Glass <sjg@chromium.org>
Sat, 16 Dec 2023 03:14:09 +0000 (20:14 -0700)
committerTom Rini <trini@konsulko.com>
Thu, 21 Dec 2023 21:07:52 +0000 (16:07 -0500)
commitc35bfd07ecdf683b6a80132f5ac6201d6d24c734
treed00be7eca01d4cff388fff7de1bee09e00794f6d
parent6557eb73d65428cd1364c823c85fe3e4f8736deb
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>
arch/riscv/cpu/cpu.c
arch/riscv/lib/reset.c