mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 06:00:43 +00:00
ofnode: Add missing address translation into ofnode_get_addr_size()
Of CONFIG_OF_TRANSLATE is enabled, this function still returns untranslated bogus results. Add the missing translation. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
51cb927504
commit
a6a45cd325
1 changed files with 5 additions and 1 deletions
|
@ -543,7 +543,11 @@ fdt_addr_t ofnode_get_addr_size(ofnode node, const char *property,
|
|||
na = of_n_addr_cells(np);
|
||||
ns = of_n_size_cells(np);
|
||||
*sizep = of_read_number(prop + na, ns);
|
||||
return of_read_number(prop, na);
|
||||
|
||||
if (IS_ENABLED(CONFIG_OF_TRANSLATE) && ns > 0)
|
||||
return of_translate_address(np, prop);
|
||||
else
|
||||
return of_read_number(prop, na);
|
||||
} else {
|
||||
return fdtdec_get_addr_size(gd->fdt_blob,
|
||||
ofnode_to_offset(node), property,
|
||||
|
|
Loading…
Reference in a new issue