forked from Mirrors/opensbi
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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user