mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-07-06 13:08:36 +00:00
lib: utils: Rename fdt_parse_clint() to fdt_parse_compat_addr()
The fdt_parse_clint() is quite generic and can be used for other types of devices so we rename it to fdt_parse_compat_addr(). Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
parent
243b0d0c0c
commit
e3ad7c13a0
3 changed files with 7 additions and 7 deletions
|
@ -32,7 +32,7 @@ int fdt_parse_uart8250(void *fdt, struct platform_uart_data *uart,
|
||||||
int fdt_parse_plic(void *fdt, struct platform_plic_data *plic,
|
int fdt_parse_plic(void *fdt, struct platform_plic_data *plic,
|
||||||
const char *compatible);
|
const char *compatible);
|
||||||
|
|
||||||
int fdt_parse_clint(void *fdt, unsigned long *clint_addr,
|
int fdt_parse_compat_addr(void *fdt, unsigned long *addr,
|
||||||
const char *compatible);
|
const char *compatible);
|
||||||
|
|
||||||
#endif /* __FDT_HELPER_H__ */
|
#endif /* __FDT_HELPER_H__ */
|
||||||
|
|
|
@ -142,8 +142,8 @@ int fdt_parse_plic(void *fdt, struct platform_plic_data *plic,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int fdt_parse_clint(void *fdt, unsigned long *clint_addr,
|
int fdt_parse_compat_addr(void *fdt, unsigned long *addr,
|
||||||
const char *compatible)
|
const char *compatible)
|
||||||
{
|
{
|
||||||
int nodeoffset, rc;
|
int nodeoffset, rc;
|
||||||
|
|
||||||
|
@ -151,8 +151,8 @@ int fdt_parse_clint(void *fdt, unsigned long *clint_addr,
|
||||||
if (nodeoffset < 0)
|
if (nodeoffset < 0)
|
||||||
return nodeoffset;
|
return nodeoffset;
|
||||||
|
|
||||||
rc = fdt_get_node_addr_size(fdt, nodeoffset, clint_addr, NULL);
|
rc = fdt_get_node_addr_size(fdt, nodeoffset, addr, NULL);
|
||||||
if (rc < 0 || !clint_addr)
|
if (rc < 0 || !addr)
|
||||||
return SBI_ENODEV;
|
return SBI_ENODEV;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -66,7 +66,7 @@ static int openpiton_early_init(bool cold_boot)
|
||||||
if (!rc)
|
if (!rc)
|
||||||
plic = plic_data;
|
plic = plic_data;
|
||||||
|
|
||||||
rc = fdt_parse_clint(fdt, &clint_data, "riscv,clint0");
|
rc = fdt_parse_compat_addr(fdt, &clint_data, "riscv,clint0");
|
||||||
if (!rc)
|
if (!rc)
|
||||||
clint_addr = clint_data;
|
clint_addr = clint_data;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue