From 90a9dd2b22bb5441df85a23e4e4690bec14fa1e5 Mon Sep 17 00:00:00 2001 From: Jan Remes Date: Fri, 13 May 2022 12:58:40 +0200 Subject: lib: utils/fdt: introduce fdt_node_is_enabled() If an FDT node contains a "status" property and this property is not "ok" or "okay", this node should be ignored. Introduce a function that checks this. Signed-off-by: Jan Remes Reviewed-by: Xiang W Reviewed-by: Anup Patel --- include/sbi_utils/fdt/fdt_helper.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/sbi_utils') diff --git a/include/sbi_utils/fdt/fdt_helper.h b/include/sbi_utils/fdt/fdt_helper.h index 2279f96f..a9c0a8a1 100644 --- a/include/sbi_utils/fdt/fdt_helper.h +++ b/include/sbi_utils/fdt/fdt_helper.h @@ -48,6 +48,8 @@ int fdt_parse_phandle_with_args(void *fdt, int nodeoff, int fdt_get_node_addr_size(void *fdt, int node, int index, uint64_t *addr, uint64_t *size); +bool fdt_node_is_enabled(void *fdt, int nodeoff); + int fdt_parse_hart_id(void *fdt, int cpu_offset, u32 *hartid); int fdt_parse_max_hart_id(void *fdt, u32 *max_hartid); -- cgit v1.3.1