summaryrefslogtreecommitdiff
path: root/arch/arm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/lib')
-rw-r--r--arch/arm/lib/Makefile1
-rw-r--r--arch/arm/lib/bootm-fdt.c7
2 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index 6e96cfb0c5..53d4ed2bc6 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -33,6 +33,7 @@ obj-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
else
obj-$(CONFIG_SPL_FRAMEWORK) += spl.o
obj-$(CONFIG_SPL_FRAMEWORK) += zimage.o
+obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
endif
obj-$(CONFIG_$(SPL_)USE_ARCH_MEMSET) += memset.o
obj-$(CONFIG_$(SPL_)USE_ARCH_MEMCPY) += memcpy.o
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;
}