summaryrefslogtreecommitdiff
path: root/arch/arm/lib/bootm-fdt.c
diff options
context:
space:
mode:
authorB, Ravi <ravibabu@ti.com>2017-04-18 17:27:26 +0530
committerTom Rini <trini@konsulko.com>2017-05-11 22:04:26 -0400
commit984a3c8777071700a5935758d0d542e7b3f97bb0 (patch)
tree66654061980e0d8f7b07b470f56ccac177dfbe87 /arch/arm/lib/bootm-fdt.c
parent907fef6cc74d540427a1e1b7f9c702c90214259a (diff)
spl: fdt: support for fdt fixup for falcon boot
Adding support for fdt fixup to update the memory node in device tree for falcon boot. This is needed for single stage or falcon bootmode, to pass memory configuration to kernel through DT memory node. Signed-off-by: Ravi Babu <ravibabu@ti.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'arch/arm/lib/bootm-fdt.c')
-rw-r--r--arch/arm/lib/bootm-fdt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/lib/bootm-fdt.c b/arch/arm/lib/bootm-fdt.c
index d84789c7a8..eaa817b9ac 100644
--- a/arch/arm/lib/bootm-fdt.c
+++ b/arch/arm/lib/bootm-fdt.c
@@ -27,8 +27,10 @@ DECLARE_GLOBAL_DATA_PTR;
int arch_fixup_fdt(void *blob)
{
+ int ret = 0;
+#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_OF_LIBFDT)
bd_t *bd = gd->bd;
- int bank, ret;
+ int bank;
u64 start[CONFIG_NR_DRAM_BANKS];
u64 size[CONFIG_NR_DRAM_BANKS];
@@ -42,9 +44,11 @@ int arch_fixup_fdt(void *blob)
#endif
}
+#ifdef CONFIG_OF_LIBFDT
ret = fdt_fixup_memory_banks(blob, start, size, CONFIG_NR_DRAM_BANKS);
if (ret)
return ret;
+#endif
#ifdef CONFIG_ARMV8_SPIN_TABLE
ret = spin_table_update_dt(blob);
@@ -58,6 +62,7 @@ int arch_fixup_fdt(void *blob)
if (ret)
return ret;
#endif
+#endif
return 0;
}