mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
lib: utils: Initialize miscellaneous drivers in one pass
For driver subsystems that are not tightly integrated into the OpenSBI init sequence, it is not important that the drivers are initialized in any particular order. By putting all of these drivers in one array, they can all be initialized with a single pass through the devicetree. This saves about 10 ms of boot time on HiFive Unmatched. Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:

committed by
Anup Patel

parent
e84ba96634
commit
434add551c
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*
|
||||
* Copyright (c) 2024 Ventana Micro Systems Inc.
|
||||
*
|
||||
* Authors:
|
||||
* Anup Patel <apatel@ventanamicro.com>
|
||||
*/
|
||||
|
||||
#ifndef __FDT_CPPC_H__
|
||||
#define __FDT_CPPC_H__
|
||||
|
||||
#include <sbi/sbi_types.h>
|
||||
#include <sbi_utils/fdt/fdt_driver.h>
|
||||
|
||||
#ifdef CONFIG_FDT_CPPC
|
||||
|
||||
void fdt_cppc_init(const void *fdt);
|
||||
|
||||
#else
|
||||
|
||||
static inline void fdt_cppc_init(const void *fdt) { }
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
@@ -18,6 +18,9 @@ struct fdt_driver {
|
||||
bool experimental;
|
||||
};
|
||||
|
||||
/* List of early FDT drivers generated at compile time */
|
||||
extern const struct fdt_driver *const fdt_early_drivers[];
|
||||
|
||||
/**
|
||||
* Initialize a driver instance for a specific DT node
|
||||
*
|
||||
|
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*
|
||||
* Copyright (c) 2024 Ventana Micro Systems Inc.
|
||||
*
|
||||
* Authors:
|
||||
* Anup Patel <apatel@ventanamicro.com>
|
||||
*/
|
||||
|
||||
#ifndef __FDT_HSM_H__
|
||||
#define __FDT_HSM_H__
|
||||
|
||||
#include <sbi/sbi_types.h>
|
||||
#include <sbi_utils/fdt/fdt_driver.h>
|
||||
|
||||
#ifdef CONFIG_FDT_HSM
|
||||
|
||||
void fdt_hsm_init(const void *fdt);
|
||||
|
||||
#else
|
||||
|
||||
static inline void fdt_hsm_init(const void *fdt) { }
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* 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
|
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*
|
||||
* Copyright (c) 2024 Ventana Micro Systems Inc.
|
||||
*
|
||||
* Authors:
|
||||
* Anup Patel <apatel@ventanamicro.com>
|
||||
*/
|
||||
|
||||
#ifndef __FDT_SUSPEND_H__
|
||||
#define __FDT_SUSPEND_H__
|
||||
|
||||
#include <sbi/sbi_types.h>
|
||||
#include <sbi_utils/fdt/fdt_driver.h>
|
||||
|
||||
#ifdef CONFIG_FDT_SUSPEND
|
||||
|
||||
void fdt_suspend_init(const void *fdt);
|
||||
|
||||
#else
|
||||
|
||||
static inline void fdt_suspend_init(const void *fdt) { }
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user