diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-05-13 07:25:28 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-05-23 08:06:46 +0300 |
commit | 569dd64b7270fd1cd17006e1b76484d84b1a0a71 (patch) | |
tree | 9d5a97ae6127548658fe04cdf72bc5c8718f9562 /lib/utils/ipi | |
parent | a9a97511851198559e75640a9e5e67f65695dc2e (diff) | |
download | opensbi-569dd64b7270fd1cd17006e1b76484d84b1a0a71.tar.xz |
lib: utils: Add fdt_parse_clint_node() function
We add fdt_parse_clint_node() function which will be used by
fdt_ipi_clint and fdt_timer_clint drivers to parse CLINT details
from DT node.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib/utils/ipi')
-rw-r--r-- | lib/utils/ipi/fdt_ipi_clint.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/utils/ipi/fdt_ipi_clint.c b/lib/utils/ipi/fdt_ipi_clint.c index c4ac0df..eead8b3 100644 --- a/lib/utils/ipi/fdt_ipi_clint.c +++ b/lib/utils/ipi/fdt_ipi_clint.c @@ -17,23 +17,11 @@ static int ipi_clint_cold_init(void *fdt, int nodeoff, const struct fdt_match *match) { int rc; - u32 max_hartid; - unsigned long addr; - rc = fdt_parse_max_hart_id(fdt, &max_hartid); + rc = fdt_parse_clint_node(fdt, nodeoff, FALSE, &clint_ipi); if (rc) return rc; - rc = fdt_get_node_addr_size(fdt, nodeoff, &addr, NULL); - if (rc) - return rc; - - /* TODO: We should figure-out CLINT has_64bit_mmio from DT node */ - clint_ipi.addr = addr; - clint_ipi.first_hartid = 0; - clint_ipi.hart_count = max_hartid + 1; - clint_ipi.has_64bit_mmio = TRUE; - return clint_cold_ipi_init(&clint_ipi); } |