summaryrefslogtreecommitdiff
path: root/lib/sbi/sbi_ecall_legacy.c
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2020-04-24 09:56:22 +0300
committerAnup Patel <anup@brainfault.org>2020-04-27 12:05:29 +0300
commita9eac67ad019200e9a281a6fc10e394353a026f2 (patch)
treebb99209d3573cfc5a6e0a2617163a160e5e452a7 /lib/sbi/sbi_ecall_legacy.c
parent1bb00ab3aeabde78579774eef8eadc7b7e765924 (diff)
downloadopensbi-a9eac67ad019200e9a281a6fc10e394353a026f2.tar.xz
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 <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib/sbi/sbi_ecall_legacy.c')
-rw-r--r--lib/sbi/sbi_ecall_legacy.c3
1 files changed, 2 insertions, 1 deletions
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 <sbi/sbi_error.h>
#include <sbi/sbi_hsm.h>
#include <sbi/sbi_ipi.h>
+#include <sbi/sbi_platform.h>
#include <sbi/sbi_system.h>
#include <sbi/sbi_timer.h>
#include <sbi/sbi_tlb.h>
@@ -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;