PowerPC: mpc85xx: Update ft_verify_fdt
PATCH 1/1 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 336a44877af8 ("fdt: Correct fdt_get_base_address()")
Cc York Sun <[email protected]>
Cc Wolfgang Denk <[email protected]>
Cc Simon Glass <[email protected]>
Signed-off-by Tom Rini <[email protected]>
--- arch/powerpc/cpu/mpc85xx/fdt.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
arch/powerpc/cpu/mpc85xx/fdt.c +9 -2
@@ -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 "
Signature · 1 line
1.9.1
PATCH 1/1 PowerPC: mpc85xx: Update ft_verify_fdt
Quoted 4 lines · Tom Rini
With the changes to
fdt_get_base_address()we need to modify the logic inft_verify_fdt()for how we check the validity of the CCSR address.Tested-on: qemu-ppce500 -M mpc8544ds
Quoted 8 lines
Fixes 336a44877af8 ("fdt: Correct fdt_get_base_address()")Cc York Sun <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Simon Glass <[email protected]>Signed-off-by Tom Rini <[email protected]>--- arch/powerpc/cpu/mpc85xx/fdt.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
Reviewed-by Simon Glass <[email protected]>
PATCH 1/1 PowerPC: mpc85xx: Update ft_verify_fdt
In reply to Tom RiniQuoted 9 lines · Tom Rini
With the changes to
fdt_get_base_address()we need to modify the logic inft_verify_fdt()for how we check the validity of the CCSR address.Tested-on: qemu-ppce500 -M mpc8544ds
Fixes 336a44877af8 ("fdt: Correct fdt_get_base_address()")Cc York Sun <[email protected]>Cc Wolfgang Denk <[email protected]>Reviewed-by Simon Glass <[email protected]>Signed-off-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170803/f5e82e0e/attachment.sig>