From a9eac67ad019200e9a281a6fc10e394353a026f2 Mon Sep 17 00:00:00 2001 From: Anup Patel Date: Fri, 24 Apr 2020 12:26:22 +0530 Subject: include: sbi_platform: Combine reboot and shutdown into one callback We can achieve shutdown, cold reboot, and warm reboot using just one sbi_platform callback so we combine system_reboot() and system_shutdown() callbacks into one system_reset() callback. Signed-off-by: Anup Patel Reviewed-by: Atish Patra --- lib/sbi/sbi_ecall_legacy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/sbi/sbi_ecall_legacy.c') diff --git a/lib/sbi/sbi_ecall_legacy.c b/lib/sbi/sbi_ecall_legacy.c index 8f32027..9f7a5b6 100644 --- a/lib/sbi/sbi_ecall_legacy.c +++ b/lib/sbi/sbi_ecall_legacy.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -99,7 +100,7 @@ static int sbi_ecall_legacy_handler(unsigned long extid, unsigned long funcid, } break; case SBI_EXT_0_1_SHUTDOWN: - sbi_system_shutdown(0); + sbi_system_reset(SBI_PLATFORM_RESET_SHUTDOWN); break; default: ret = SBI_ENOTSUPP; -- cgit v1.2.3