From: Rob Herring <r...@kernel.org> Currently, u-boot will always fixup the DT memory node on ARM. If the dtb has correct memory information, then we don't want or need u-boot to touch the memory node. Allow platforms to skip this by not filling in dram bank information.
Signed-off-by: Rob Herring <r...@kernel.org> Signed-off-by: Andre Przywara <o...@andrep.de> --- arch/arm/lib/board.c | 2 ++ arch/arm/lib/bootm-fdt.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 37ea6e9..a3c7315 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -191,8 +191,10 @@ typedef int (init_fnc_t) (void); __weak void dram_init_banksize(void) { +#if CONFIG_NR_DRAM_BANKS gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; gd->bd->bi_dram[0].size = gd->ram_size; +#endif } __weak int arch_cpu_init(void) diff --git a/arch/arm/lib/bootm-fdt.c b/arch/arm/lib/bootm-fdt.c index 7677358..dbf3d56 100644 --- a/arch/arm/lib/bootm-fdt.c +++ b/arch/arm/lib/bootm-fdt.c @@ -26,8 +26,10 @@ DECLARE_GLOBAL_DATA_PTR; int arch_fixup_fdt(void *blob) { + int ret = 0; +#if CONFIG_NR_DRAM_BANKS bd_t *bd = gd->bd; - int bank, ret; + int bank; u64 start[CONFIG_NR_DRAM_BANKS]; u64 size[CONFIG_NR_DRAM_BANKS]; @@ -42,6 +44,7 @@ int arch_fixup_fdt(void *blob) } ret = fdt_fixup_memory_banks(blob, start, size, CONFIG_NR_DRAM_BANKS); +#endif #ifdef CONFIG_ARMV7_NONSEC if (ret) return ret; -- 1.8.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot