提交 9f841559 编写于 作者: T Tom Rini

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: 336a4487 ("fdt: Correct fdt_get_base_address()")
Reviewed-by: NSimon Glass <sjg@chromium.org>
Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: NTom Rini <trini@konsulko.com>
上级 7b9c88bf
...@@ -50,13 +50,19 @@ uint64_t get_phys_ccsrbar_addr_early(void) ...@@ -50,13 +50,19 @@ uint64_t get_phys_ccsrbar_addr_early(void)
{ {
void *fdt = get_fdt_virt(); void *fdt = get_fdt_virt();
uint64_t r; 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 * To be able to read the FDT we need to create a temporary TLB
* map for it. * map for it.
*/ */
map_fdt_as(10); 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); disable_tlb(10);
return r; return r;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册