diff options
author | Anup Patel <apatel@ventanamicro.com> | 2022-08-08 07:03:26 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2022-08-08 07:03:26 +0300 |
commit | 2adc94b466ed8154fb72d276bbfaf35e22d97033 (patch) | |
tree | 0df814e77aaab82c352d8d9964d8a8501aa4c452 /include/sbi_utils/reset | |
parent | 26bbff5f76e0ecd7a8e3f322961c481b73097a65 (diff) | |
download | opensbi-2adc94b466ed8154fb72d276bbfaf35e22d97033.tar.xz |
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>
Diffstat (limited to 'include/sbi_utils/reset')
-rw-r--r-- | include/sbi_utils/reset/fdt_reset.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/sbi_utils/reset/fdt_reset.h b/include/sbi_utils/reset/fdt_reset.h index e7f7350..ea8063b 100644 --- a/include/sbi_utils/reset/fdt_reset.h +++ b/include/sbi_utils/reset/fdt_reset.h @@ -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 |