From ba29293dc947e13fa2e63de7ed289d7bb9b540f4 Mon Sep 17 00:00:00 2001 From: Inochi Amaoto Date: Wed, 27 Dec 2023 08:46:11 +0800 Subject: lib: utils/timer: mtimer: only use regname for aclint The parser will fail if the timer is clint timer and has regname property. As the regname is only meaningful for aclint, it is more robust to only check regname for aclint timer. Fixes: 6112d58 ("lib: utils/fdt: Allow to use reg-names when parsing ACLINT") Signed-off-by: Inochi Amaoto Reviewed-by: Anup Patel --- include/sbi_utils/fdt/fdt_helper.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/sbi_utils/fdt/fdt_helper.h b/include/sbi_utils/fdt/fdt_helper.h index 430d8180..ab4a80fa 100644 --- a/include/sbi_utils/fdt/fdt_helper.h +++ b/include/sbi_utils/fdt/fdt_helper.h @@ -99,7 +99,8 @@ int fdt_parse_plic_node(void *fdt, int nodeoffset, struct plic_data *plic); int fdt_parse_plic(void *fdt, struct plic_data *plic, const char *compat); -int fdt_parse_aclint_node(void *fdt, int nodeoffset, bool for_timer, +int fdt_parse_aclint_node(void *fdt, int nodeoffset, + bool for_timer, bool allow_regname, unsigned long *out_addr1, unsigned long *out_size1, unsigned long *out_addr2, unsigned long *out_size2, u32 *out_first_hartid, u32 *out_hart_count); -- cgit v1.3.1