mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
lib: sbi: Simplify system reset platform operations
Instead of having system_reset_check() and system_reset() callbacks in platform operations, it will be much simpler for reset driver to directly register these operations as a device to the sbi_system implementation. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
@@ -115,21 +115,6 @@ static int platform_timer_init(bool cold_boot)
|
||||
return clint_warm_timer_init();
|
||||
}
|
||||
|
||||
/*
|
||||
* Check reset type and reason supported by the platform.
|
||||
*/
|
||||
static int platform_system_reset_check(u32 type, u32 reason)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reset the platform.
|
||||
*/
|
||||
static void platform_system_reset(u32 type, u32 reason)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* Platform descriptor.
|
||||
*/
|
||||
@@ -139,9 +124,7 @@ const struct sbi_platform_operations platform_ops = {
|
||||
.console_init = platform_console_init,
|
||||
.irqchip_init = platform_irqchip_init,
|
||||
.ipi_init = platform_ipi_init,
|
||||
.timer_init = platform_timer_init,
|
||||
.system_reset_check = platform_system_reset_check,
|
||||
.system_reset = platform_system_reset
|
||||
.timer_init = platform_timer_init
|
||||
};
|
||||
const struct sbi_platform platform = {
|
||||
.opensbi_version = OPENSBI_VERSION,
|
||||
|
Reference in New Issue
Block a user