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>
32 lines
562 B
C
32 lines
562 B
C
/*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*
|
|
* Copyright (c) 2020 Western Digital Corporation or its affiliates.
|
|
*
|
|
* Authors:
|
|
* Anup Patel <anup.patel@wdc.com>
|
|
*/
|
|
|
|
#ifndef __FDT_RESET_H__
|
|
#define __FDT_RESET_H__
|
|
|
|
#include <sbi/sbi_types.h>
|
|
#include <sbi_utils/fdt/fdt_driver.h>
|
|
|
|
#ifdef CONFIG_FDT_RESET
|
|
|
|
/**
|
|
* fdt_reset_init() - initialize reset drivers based on the device-tree
|
|
*
|
|
* This function shall be invoked in final init.
|
|
*/
|
|
void fdt_reset_init(const void *fdt);
|
|
|
|
#else
|
|
|
|
static inline void fdt_reset_init(const void *fdt) { }
|
|
|
|
#endif
|
|
|
|
#endif
|