summaryrefslogtreecommitdiff
path: root/board/freescale/qemu-ppce500
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-08-03 08:53:36 -0400
committerTom Rini <trini@konsulko.com>2017-08-03 14:48:52 -0400
commit9f841559a5ecfc1c860819a5b6b516568bc374d5 (patch)
tree553d38412377e31ffb1456f76973f2d886b4a4fa /board/freescale/qemu-ppce500
parent7b9c88bfca6b445e26767494a30083d3b75b5b67 (diff)
qemu-ppce500: Update get_phys_ccsrbar_addr_early()
The logic of what fdt_get_base_address() will search for and return has changed. Rework get_phys_ccsrbar_addr_early() to perform the logic that fdt_get_base_address used to perform. Fixes: 336a44877af8 ("fdt: Correct fdt_get_base_address()") Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Alexander Graf <agraf@suse.de> Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board/freescale/qemu-ppce500')
-rw-r--r--board/freescale/qemu-ppce500/qemu-ppce500.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c
index 6cb5692eda..0c65ec72d2 100644
--- a/board/freescale/qemu-ppce500/qemu-ppce500.c
+++ b/board/freescale/qemu-ppce500/qemu-ppce500.c
@@ -50,13 +50,19 @@ uint64_t get_phys_ccsrbar_addr_early(void)
{
void *fdt = get_fdt_virt();
uint64_t r;
+ int size, node;
+ u32 naddr;
+ const fdt32_t *prop;
/*
* To be able to read the FDT we need to create a temporary TLB
* map for it.
*/
map_fdt_as(10);
- r = fdt_get_base_address(fdt, fdt_path_offset(fdt, "/soc"));
+ node = fdt_path_offset(fdt, "/soc");
+ naddr = fdt_address_cells(fdt, node);
+ prop = fdt_getprop(fdt, node, "ranges", &size);
+ r = fdt_translate_address(fdt, node, prop + naddr);
disable_tlb(10);
return r;