devicetree/fdt: fix fdt_get_reg_size() get wrong size
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com> Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
323e2518d9
commit
ba18f87a9e
|
@ -325,7 +325,9 @@ size_t fdt_get_reg_size(FAR const void *fdt, int offset)
|
|||
reg = fdt_getprop(fdt, offset, "reg", NULL);
|
||||
if (reg != NULL)
|
||||
{
|
||||
size = fdt_ld_by_cells(reg, fdt_get_parent_size_cells(fdt, offset));
|
||||
size = fdt_ld_by_cells((FAR fdt32_t *)reg +
|
||||
fdt_get_parent_address_cells(fdt, offset),
|
||||
fdt_get_parent_size_cells(fdt, offset));
|
||||
}
|
||||
|
||||
return size;
|
||||
|
|
Loading…
Reference in New Issue