forked from Mirrors/opensbi
lib: utils: Add FDT parsing API common for both ACLINT and CLINT
We add fdt_parse_aclint_node() which can parse both ACLINT and CLINT DT nodes. This means fdt_parse_clint_node() is not required anymore so we remove it as well. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Xiang W <wxjstz@126.com>
This commit is contained in:
@@ -21,15 +21,18 @@ static int ipi_clint_cold_init(void *fdt, int nodeoff,
|
||||
const struct fdt_match *match)
|
||||
{
|
||||
int rc;
|
||||
unsigned long cisize;
|
||||
struct clint_data *ci;
|
||||
|
||||
if (CLINT_IPI_MAX_NR <= clint_ipi_count)
|
||||
return SBI_ENOSPC;
|
||||
ci = &clint_ipi[clint_ipi_count++];
|
||||
|
||||
rc = fdt_parse_clint_node(fdt, nodeoff, FALSE, ci);
|
||||
rc = fdt_parse_aclint_node(fdt, nodeoff, false, &ci->addr, &cisize,
|
||||
&ci->first_hartid, &ci->hart_count);
|
||||
if (rc)
|
||||
return rc;
|
||||
ci->has_64bit_mmio = false;
|
||||
|
||||
return clint_cold_ipi_init(ci);
|
||||
}
|
||||
|
Reference in New Issue
Block a user