mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +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:
@@ -23,20 +23,6 @@ static struct fdt_reset *reset_drivers[] = {
|
||||
|
||||
static struct fdt_reset *current_driver = NULL;
|
||||
|
||||
int fdt_system_reset_check(u32 reset_type, u32 reset_reason)
|
||||
{
|
||||
if (current_driver && current_driver->system_reset_check)
|
||||
return current_driver->system_reset_check(reset_type,
|
||||
reset_reason);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void fdt_system_reset(u32 reset_type, u32 reset_reason)
|
||||
{
|
||||
if (current_driver && current_driver->system_reset)
|
||||
current_driver->system_reset(reset_type, reset_reason);
|
||||
}
|
||||
|
||||
int fdt_reset_init(void)
|
||||
{
|
||||
int pos, noff, rc;
|
||||
|
Reference in New Issue
Block a user