diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-04-24 12:26:22 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-04-27 14:35:29 +0530 |
commit | a9eac67ad019200e9a281a6fc10e394353a026f2 (patch) | |
tree | bb99209d3573cfc5a6e0a2617163a160e5e452a7 /platform/template | |
parent | 1bb00ab3aeabde78579774eef8eadc7b7e765924 (diff) |
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 'platform/template')
-rw-r--r-- | platform/template/platform.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/platform/template/platform.c b/platform/template/platform.c index ef32941..84fbf56 100644 --- a/platform/template/platform.c +++ b/platform/template/platform.c @@ -162,17 +162,9 @@ static void platform_timer_event_stop(void) } /* - * Reboot the platform. + * Reset the platform. */ -static int platform_system_reboot(u32 type) -{ - return 0; -} - -/* - * Shutdown or poweroff the platform. - */ -static int platform_system_shutdown(u32 type) +static int platform_system_reset(u32 type) { return 0; } @@ -194,8 +186,7 @@ const struct sbi_platform_operations platform_ops = { .timer_event_stop = platform_timer_event_stop, .timer_event_start = platform_timer_event_start, .timer_init = platform_timer_init, - .system_reboot = platform_system_reboot, - .system_shutdown = platform_system_shutdown + .system_reset = platform_system_reset }; const struct sbi_platform platform = { .opensbi_version = OPENSBI_VERSION, |