diff options
author | Anup Patel <anup.patel@wdc.com> | 2021-05-20 13:38:38 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2021-06-24 09:39:48 +0530 |
commit | bd5d2089b80742a210b257c8e6c1361310725200 (patch) | |
tree | ada664073241ca2ac195f1cd1f15001307c0e520 /lib/utils/ipi | |
parent | 5a049fe1d6a5d1c381113853fce3afad6573bb56 (diff) |
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>
Diffstat (limited to 'lib/utils/ipi')
-rw-r--r-- | lib/utils/ipi/fdt_ipi_clint.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/utils/ipi/fdt_ipi_clint.c b/lib/utils/ipi/fdt_ipi_clint.c index 529f978..ce0ca8e 100644 --- a/lib/utils/ipi/fdt_ipi_clint.c +++ b/lib/utils/ipi/fdt_ipi_clint.c @@ -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); } |