int fdt_parse_plic(void *fdt, struct platform_plic_data *plic,
const char *compatible);
-int fdt_parse_clint(void *fdt, unsigned long *clint_addr,
- const char *compatible);
+int fdt_parse_compat_addr(void *fdt, unsigned long *addr,
+ const char *compatible);
#endif /* __FDT_HELPER_H__ */
return 0;
}
-int fdt_parse_clint(void *fdt, unsigned long *clint_addr,
- const char *compatible)
+int fdt_parse_compat_addr(void *fdt, unsigned long *addr,
+ const char *compatible)
{
int nodeoffset, rc;
if (nodeoffset < 0)
return nodeoffset;
- rc = fdt_get_node_addr_size(fdt, nodeoffset, clint_addr, NULL);
- if (rc < 0 || !clint_addr)
+ rc = fdt_get_node_addr_size(fdt, nodeoffset, addr, NULL);
+ if (rc < 0 || !addr)
return SBI_ENODEV;
return 0;
if (!rc)
plic = plic_data;
- rc = fdt_parse_clint(fdt, &clint_data, "riscv,clint0");
+ rc = fdt_parse_compat_addr(fdt, &clint_data, "riscv,clint0");
if (!rc)
clint_addr = clint_data;