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>
This commit is contained in:
Anup Patel
2020-04-24 12:26:22 +05:30
committed by Anup Patel
parent 1bb00ab3ae
commit a9eac67ad0
15 changed files with 46 additions and 138 deletions

View File

@@ -100,7 +100,7 @@ static int virt_timer_init(bool cold_boot)
return clint_warm_timer_init();
}
static int virt_system_down(u32 type)
static int virt_system_reset(u32 type)
{
/* Tell the "finisher" that the simulation
* was successful so that QEMU exits
@@ -123,8 +123,7 @@ const struct sbi_platform_operations platform_ops = {
.timer_event_stop = clint_timer_event_stop,
.timer_event_start = clint_timer_event_start,
.timer_init = virt_timer_init,
.system_reboot = virt_system_down,
.system_shutdown = virt_system_down
.system_reset = virt_system_reset,
};
const struct sbi_platform platform = {