aboutsummaryrefslogtreecommitdiff
path: root/platform/kendryte
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2020-04-24 12:26:22 +0530
committerAnup Patel <anup@brainfault.org>2020-04-27 14:35:29 +0530
commita9eac67ad019200e9a281a6fc10e394353a026f2 (patch)
treebb99209d3573cfc5a6e0a2617163a160e5e452a7 /platform/kendryte
parent1bb00ab3aeabde78579774eef8eadc7b7e765924 (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/kendryte')
-rw-r--r--platform/kendryte/k210/platform.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/platform/kendryte/k210/platform.c b/platform/kendryte/k210/platform.c
index 16ee985..69c0e21 100644
--- a/platform/kendryte/k210/platform.c
+++ b/platform/kendryte/k210/platform.c
@@ -96,18 +96,10 @@ static int k210_timer_init(bool cold_boot)
return clint_warm_timer_init();
}
-static int k210_system_reboot(u32 type)
+static int k210_system_reset(u32 type)
{
/* For now nothing to do. */
- sbi_printf("System reboot\n");
-
- return 0;
-}
-
-static int k210_system_shutdown(u32 type)
-{
- /* For now nothing to do. */
- sbi_printf("System shutdown\n");
+ sbi_printf("System reset\n");
return 0;
}
@@ -128,8 +120,7 @@ const struct sbi_platform_operations platform_ops = {
.timer_event_stop = clint_timer_event_stop,
.timer_event_start = clint_timer_event_start,
- .system_reboot = k210_system_reboot,
- .system_shutdown = k210_system_shutdown
+ .system_reset = k210_system_reset
};
const struct sbi_platform platform = {