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/fpga | |
parent | 1bb00ab3aeabde78579774eef8eadc7b7e765924 (diff) | |
download | opensbi-a9eac67ad019200e9a281a6fc10e394353a026f2.zip opensbi-a9eac67ad019200e9a281a6fc10e394353a026f2.tar.gz opensbi-a9eac67ad019200e9a281a6fc10e394353a026f2.tar.bz2 |
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/fpga')
-rw-r--r-- | platform/fpga/ariane/platform.c | 19 | ||||
-rw-r--r-- | platform/fpga/openpiton/platform.c | 19 |
2 files changed, 8 insertions, 30 deletions
diff --git a/platform/fpga/ariane/platform.c b/platform/fpga/ariane/platform.c index 9537b64..7c76ff8 100644 --- a/platform/fpga/ariane/platform.c +++ b/platform/fpga/ariane/platform.c @@ -150,22 +150,12 @@ static int ariane_timer_init(bool cold_boot) } /* - * Reboot the ariane. + * Reset the ariane. */ -static int ariane_system_reboot(u32 type) +static int ariane_system_reset(u32 type) { /* For now nothing to do. */ - sbi_printf("System reboot\n"); - return 0; -} - -/* - * Shutdown or poweroff the ariane. - */ -static int ariane_system_shutdown(u32 type) -{ - /* For now nothing to do. */ - sbi_printf("System shutdown\n"); + sbi_printf("System reset\n"); return 0; } @@ -186,8 +176,7 @@ const struct sbi_platform_operations platform_ops = { .timer_value = clint_timer_value, .timer_event_start = clint_timer_event_start, .timer_event_stop = clint_timer_event_stop, - .system_reboot = ariane_system_reboot, - .system_shutdown = ariane_system_shutdown + .system_reset = ariane_system_reset }; const struct sbi_platform platform = { diff --git a/platform/fpga/openpiton/platform.c b/platform/fpga/openpiton/platform.c index 4c83f6d..019dcc5 100644 --- a/platform/fpga/openpiton/platform.c +++ b/platform/fpga/openpiton/platform.c @@ -182,22 +182,12 @@ static int openpiton_timer_init(bool cold_boot) } /* - * Reboot the openpiton. + * Reset the openpiton. */ -static int openpiton_system_reboot(u32 type) +static int openpiton_system_reset(u32 type) { /* For now nothing to do. */ - sbi_printf("System reboot\n"); - return 0; -} - -/* - * Shutdown or poweroff the openpiton. - */ -static int openpiton_system_shutdown(u32 type) -{ - /* For now nothing to do. */ - sbi_printf("System shutdown\n"); + sbi_printf("System reset\n"); return 0; } @@ -218,8 +208,7 @@ const struct sbi_platform_operations platform_ops = { .timer_value = clint_timer_value, .timer_event_start = clint_timer_event_start, .timer_event_stop = clint_timer_event_stop, - .system_reboot = openpiton_system_reboot, - .system_shutdown = openpiton_system_shutdown + .system_reset = openpiton_system_reset }; const struct sbi_platform platform = { |