mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00

The reset driver subsystem does not need any extra data, so it can use `struct fdt_driver` directly. The generic fdt_reset_init() performs a best-effort initialization of all matching DT nodes. Platform-specific logic expects exactly one DT node to match a single driver. This is accomplished by using fdt_driver_init_one() with a local list containing that one driver. Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org>
19 lines
418 B
C
19 lines
418 B
C
/*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*
|
|
* Copyright (c) 2020 Western Digital Corporation or its affiliates.
|
|
*
|
|
* Authors:
|
|
* Anup Patel <anup.patel@wdc.com>
|
|
*/
|
|
|
|
#include <sbi_utils/reset/fdt_reset.h>
|
|
|
|
/* List of FDT reset drivers generated at compile time */
|
|
extern const struct fdt_driver *const fdt_reset_drivers[];
|
|
|
|
void fdt_reset_init(const void *fdt)
|
|
{
|
|
fdt_driver_init_all(fdt, fdt_reset_drivers);
|
|
}
|