mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
lib: utils/reset: Use kconfig for enabling/disabling drivers
We update reset drivers makefile to use kconfig for enabling/disabling drivers. To avoid compile errors, we also enable appropriate reset drivers for each platform. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Tested-by: Andrew Jones <ajones@ventanamicro.com> Acked-by: Atish Patra <atishp@rivosinc.com> Tested-by: Atish Patra <atishp@rivosinc.com>
This commit is contained in:
@@ -17,6 +17,8 @@ struct fdt_reset {
|
||||
int (*init)(void *fdt, int nodeoff, const struct fdt_match *match);
|
||||
};
|
||||
|
||||
#ifdef CONFIG_FDT_RESET
|
||||
|
||||
/**
|
||||
* fdt_reset_driver_init() - initialize reset driver based on the device-tree
|
||||
*/
|
||||
@@ -29,4 +31,14 @@ int fdt_reset_driver_init(void *fdt, struct fdt_reset *drv);
|
||||
*/
|
||||
void fdt_reset_init(void);
|
||||
|
||||
#else
|
||||
|
||||
static inline int fdt_reset_driver_init(void *fdt, struct fdt_reset *drv)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void fdt_reset_init(void) { }
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user