summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnup Patel <apatel@ventanamicro.com>2022-08-08 07:03:26 +0300
committerAnup Patel <anup@brainfault.org>2022-08-08 07:03:26 +0300
commit2adc94b466ed8154fb72d276bbfaf35e22d97033 (patch)
tree0df814e77aaab82c352d8d9964d8a8501aa4c452 /include
parent26bbff5f76e0ecd7a8e3f322961c481b73097a65 (diff)
downloadopensbi-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')
-rw-r--r--include/sbi_utils/reset/fdt_reset.h12
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