summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAndrew F. Davis <afd@ti.com>2017-02-10 14:23:23 (GMT)
committerTom Rini <trini@konsulko.com>2017-02-17 19:15:12 (GMT)
commitbc1e0dd947875eba7d526e1551623f0c1458b565 (patch)
treef75ab3725e989ed8f990cfdfbad39d82166c6af7 /arch
parent645cb46e2b6b446d10745662edba680ed36b5184 (diff)
downloadu-boot-bc1e0dd947875eba7d526e1551623f0c1458b565.tar.xz
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 <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/omap5/fdt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap5/fdt.c b/arch/arm/mach-omap2/omap5/fdt.c
index 900f001..7a3a8db 100644
--- a/arch/arm/mach-omap2/omap5/fdt.c
+++ b/arch/arm/mach-omap2/omap5/fdt.c
@@ -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";