lib: utils: Extend fdt_get_node_addr_size() for multiple register sets

We add "index" parameter to fdt_get_node_addr_size() API so that
calling function can specify index of desired register set. This
will allow fdt_get_node_addr_size() to handle DT nodes with
multiple register sets.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
Anup Patel
2021-04-21 14:11:55 +05:30
committed by Anup Patel
parent e0d1b9db8a
commit 7a3a0cce4d
4 changed files with 27 additions and 12 deletions

View File

@@ -77,7 +77,7 @@ static int sifive_gpio_init(void *fdt, int nodeoff, u32 phandle,
return SBI_ENOSPC;
chip = &sifive_gpio_chip_array[sifive_gpio_chip_count];
rc = fdt_get_node_addr_size(fdt, nodeoff, &addr, NULL);
rc = fdt_get_node_addr_size(fdt, nodeoff, 0, &addr, NULL);
if (rc)
return rc;