public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] ARM: bootm: allow skipping fdt memory node fixup
@ 2013-01-25  3:39 Rob Herring
  2013-01-25  3:39 ` [U-Boot] [PATCH 2/2] ARM: highbank: remove DRAM bank setup Rob Herring
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Rob Herring @ 2013-01-25  3:39 UTC (permalink / raw)
  To: u-boot

From: Rob Herring <rob.herring@calxeda.com>

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 <rob.herring@calxeda.com>
---
 arch/arm/lib/board.c |    2 ++
 arch/arm/lib/bootm.c |    4 ++++
 2 files changed, 6 insertions(+)

diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index cfe32cc..235f953 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -212,8 +212,10 @@ int print_cpuinfo(void);
 
 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
 }
 void dram_init_banksize(void)
 	__attribute__((weak, alias("__dram_init_banksize")));
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 1bd2730..1f54217 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -79,6 +79,7 @@ void arch_lmb_reserve(struct lmb *lmb)
 #ifdef CONFIG_OF_LIBFDT
 static int fixup_memory_node(void *blob)
 {
+#if CONFIG_NR_DRAM_BANKS
 	bd_t	*bd = gd->bd;
 	int bank;
 	u64 start[CONFIG_NR_DRAM_BANKS];
@@ -90,6 +91,9 @@ static int fixup_memory_node(void *blob)
 	}
 
 	return fdt_fixup_memory_banks(blob, start, size, CONFIG_NR_DRAM_BANKS);
+#else
+	return 0;
+#endif
 }
 #endif
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-02-20 22:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-25  3:39 [U-Boot] [PATCH 1/2] ARM: bootm: allow skipping fdt memory node fixup Rob Herring
2013-01-25  3:39 ` [U-Boot] [PATCH 2/2] ARM: highbank: remove DRAM bank setup Rob Herring
2013-02-19 19:27   ` Wolfgang Denk
2013-02-19 16:35 ` [U-Boot] [PATCH 1/2] ARM: bootm: allow skipping fdt memory node fixup Tom Rini
2013-02-19 19:26 ` Wolfgang Denk
2013-02-19 20:39   ` Rob Herring
2013-02-19 23:14     ` Wolfgang Denk
2013-02-20 14:07       ` Rob Herring
2013-02-20 14:11       ` Wolfgang Denk
2013-02-20 14:33     ` Tom Rini
2013-02-20 21:55       ` Peter Korsgaard
2013-02-20 22:13         ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox