arm: omap5: Fix generation of reserved-memory DT node
Subsystems (3)
PATCH 1/1 arm: omap5: Fix generation of reserved-memory DT node
When the node 'reserved-memory' is not defined in the DT we fail to add needed properties. We also fail to move 'offs' to point to the new node. Fix these here.
Signed-off-by Andrew F. Davis <[email protected]>
--- arch/arm/mach-omap2/omap5/fdt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/omap5/fdt.c +6 -1
@@ -161,6 +161,7 @@ static int ft_hs_fixup_dram(void *fdt, bd_t *bd)u32 sec_mem_start =CONFIG_TI_SECURE_EMIF_REGION_START ;u32 sec_mem_size =CONFIG_TI_SECURE_EMIF_TOTAL_REGION_SIZE ;fdt64_t temp[2 ]; +fdt32_t two;/* If start address is zero, place at end of DRAM */ if (0 == sec_mem_start)
@@ -181,7 +182,7 @@ static int ft_hs_fixup_dram(void *fdt, bd_t *bd)debug ("Node %s not found\n" , path); path ="/" ; subpath ="reserved-memory" ; -fdt_path_offset (fdt, path); + offs =fdt_path_offset (fdt, path); offs =fdt_add_subnode (fdt, offs, subpath);if (offs <0 ) {printf ("Could not create %s%s node.\n" , path, subpath);
@@ -189,6 +190,10 @@ static int ft_hs_fixup_dram(void *fdt, bd_t *bd) } path ="/reserved-memory" ; offs =fdt_path_offset (fdt, path); + two =cpu_to_fdt32 (2 ); +fdt_setprop (fdt, offs,"#address-cells" , &two,sizeof (two)); +fdt_setprop (fdt, offs,"#size-cells" , &two,sizeof (two)); +fdt_setprop (fdt, offs,"ranges" ,NULL ,0 ); } subpath ="secure_reserved" ;
Signature · 1 line
2.11.0
PATCH 1/1 arm: omap5: Fix generation of reserved-memory DT node
Quoted 5 lines · Andrew F. Davis
When the node 'reserved-memory' is not defined in the DT we fail to add needed properties. We also fail to move 'offs' to point to the new node. Fix these here.
Signed-off-by Andrew F. Davis <[email protected]>
Reviewed-by Tom Rini <[email protected]>
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/20170210/ee63bea2/attachment.sig>
Quoted 6 lines · Andrew F. Davis
When the node 'reserved-memory' is not defined in the DT we fail to add needed properties. We also fail to move 'offs' to point to the new node. Fix these here.
Signed-off-by Andrew F. Davis <[email protected]>Reviewed-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/20170217/38298fed/attachment.sig>