summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnup Patel <[email protected]>2022-08-08 09:33:37 +0530
committerAnup Patel <[email protected]>2022-08-08 09:33:37 +0530
commit013dbb3a60db0f7d9c92990b266c3df9d3552c0c (patch)
tree0877b1be509158a7cac99ad68b6101671dab7dbc /include
parent3e76a607b5df33b2bc200c942fa76e6d06689cf6 (diff)
lib: utils/timer: Use kconfig for enabling/disabling drivers
We update timer drivers makefile to use kconfig for enabling/disabling drivers. To avoid compile errors, we also enable appropriate timer drivers for each platform. Signed-off-by: Anup Patel <[email protected]> Tested-by: Andrew Jones <[email protected]> Acked-by: Atish Patra <[email protected]> Tested-by: Atish Patra <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/sbi_utils/timer/fdt_timer.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/sbi_utils/timer/fdt_timer.h b/include/sbi_utils/timer/fdt_timer.h
index 36202a41..cf105fed 100644
--- a/include/sbi_utils/timer/fdt_timer.h
+++ b/include/sbi_utils/timer/fdt_timer.h
@@ -12,6 +12,8 @@
#include <sbi/sbi_types.h>
+#ifdef CONFIG_FDT_TIMER
+
struct fdt_timer {
const struct fdt_match *match_table;
int (*cold_init)(void *fdt, int nodeoff, const struct fdt_match *match);
@@ -23,4 +25,11 @@ void fdt_timer_exit(void);
int fdt_timer_init(bool cold_boot);
+#else
+
+static inline void fdt_timer_exit(void) { }
+static inline int fdt_timer_init(bool cold_boot) { return 0; }
+
+#endif
+
#endif