Skip to content
Snippets Groups Projects
Commit 217324b2 authored by Tom Rini's avatar Tom Rini
Browse files

PowerPC: mpc85xx: Update ft_verify_fdt


With the changes to fdt_get_base_address() we need to modify the logic
in ft_verify_fdt() for how we check the validity of the CCSR address.

Tested-on: qemu-ppce500 -M mpc8544ds
Fixes: 336a4487 ("fdt: Correct fdt_get_base_address()")
Cc: York Sun <york.sun@nxp.com>
Cc: Wolfgang Denk <wd@denx.de>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
Signed-off-by: default avatarTom Rini <trini@konsulko.com>
parent 9f841559
No related branches found
No related tags found
No related merge requests found
......@@ -770,8 +770,15 @@ int ft_verify_fdt(void *fdt)
/* First check the CCSR base address */
off = fdt_node_offset_by_prop_value(fdt, -1, "device_type", "soc", 4);
if (off > 0)
addr = fdt_get_base_address(fdt, off);
if (off > 0) {
int size;
u32 naddr;
const fdt32_t *prop;
naddr = fdt_address_cells(fdt, off);
prop = fdt_getprop(fdt, off, "ranges", &size);
addr = fdt_translate_address(fdt, off, prop + naddr);
}
if (!addr) {
printf("Warning: could not determine base CCSR address in "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment