diff options
| author | Anup Patel <[email protected]> | 2022-08-08 09:34:08 +0530 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2022-08-08 09:34:08 +0530 |
| commit | 68d7b85ec75119787d7c672062de5d29156c44be (patch) | |
| tree | 36d2d61805ffc90e20969ad46e6a5df2fd40d982 /include/sbi_utils | |
| parent | 5616aa4f4a6d88b1099b90a7e4b1fcf996cf5dab (diff) | |
lib: utils/fdt: Use kconfig for enabling/disabling
We update FDT support makefile to use kconfig for enabling/disabling.
To avoid compilation errors, we also enable FDT 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/sbi_utils')
| -rw-r--r-- | include/sbi_utils/fdt/fdt_domain.h | 9 | ||||
| -rw-r--r-- | include/sbi_utils/fdt/fdt_pmu.h | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/include/sbi_utils/fdt/fdt_domain.h b/include/sbi_utils/fdt/fdt_domain.h index 5448eb4d..ee09d1bf 100644 --- a/include/sbi_utils/fdt/fdt_domain.h +++ b/include/sbi_utils/fdt/fdt_domain.h @@ -13,6 +13,8 @@ #include <sbi/sbi_types.h> +#ifdef CONFIG_FDT_DOMAIN + struct sbi_domain; /** @@ -70,4 +72,11 @@ void fdt_domain_fixup(void *fdt); */ int fdt_domains_populate(void *fdt); +#else + +static inline void fdt_domain_fixup(void *fdt) { } +static inline int fdt_domains_populate(void *fdt) { return 0; } + +#endif + #endif /* __FDT_DOMAIN_H__ */ diff --git a/include/sbi_utils/fdt/fdt_pmu.h b/include/sbi_utils/fdt/fdt_pmu.h index 2fa01edc..c65cad78 100644 --- a/include/sbi_utils/fdt/fdt_pmu.h +++ b/include/sbi_utils/fdt/fdt_pmu.h @@ -13,6 +13,8 @@ #include <sbi/sbi_types.h> +#ifdef CONFIG_FDT_PMU + /** * Fix up the PMU node in the device tree * @@ -43,4 +45,12 @@ int fdt_pmu_setup(void *fdt); */ uint64_t fdt_pmu_get_select_value(uint32_t event_idx); +#else + +static inline void fdt_pmu_fixup(void *fdt) { } +static inline int fdt_pmu_setup(void *fdt) { return 0; } +static inline uint64_t fdt_pmu_get_select_value(uint32_t event_idx) { return 0; } + +#endif + #endif |
