public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm/omap3: limit chip select iteration based on board config
@ 2011-12-22 19:28 Grant Erickson
  2012-01-03 14:31 ` Tom Rini
       [not found] ` <4f0475fc.a24de70a.57f2.540d@mx.google.com>
  0 siblings, 2 replies; 6+ messages in thread
From: Grant Erickson @ 2011-12-22 19:28 UTC (permalink / raw)
  To: u-boot

Only attempt to configure and add DRAM at chip select 1 if the board has configured more than one bank of DRAM.

This prevents boards that have CONFIG_NR_DRAM_BANKS set to 1 from getting an incorrect DRAM size.

Signed-off-by: Grant Erickson <marathon96@gmail.com>
Cc: Tom Rini <trini@ti.com>
---
 arch/arm/cpu/armv7/omap3/sdrc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap3/sdrc.c b/arch/arm/cpu/armv7/omap3/sdrc.c
index a27b4b1..4c02214 100644
--- a/arch/arm/cpu/armv7/omap3/sdrc.c
+++ b/arch/arm/cpu/armv7/omap3/sdrc.c
@@ -213,6 +213,7 @@ int dram_init(void)
 	unsigned int size0 = 0, size1 = 0;
 
 	size0 = get_sdr_cs_size(CS0);
+#if CONFIG_NR_DRAM_BANKS > 1
 	/*
 	 * We always need to have cs_cfg point at where the second
 	 * bank would be, if present.  Failure to do so can lead to
@@ -223,6 +224,7 @@ int dram_init(void)
 	make_cs1_contiguous();
 	do_sdrc_init(CS1, NOT_EARLY);
 	size1 = get_sdr_cs_size(CS1);
+#endif
 
 	gd->ram_size = size0 + size1;
 
-- 
1.7.7.3

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

end of thread, other threads:[~2012-01-05  8:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-22 19:28 [U-Boot] [PATCH] arm/omap3: limit chip select iteration based on board config Grant Erickson
2012-01-03 14:31 ` Tom Rini
     [not found] ` <4f0475fc.a24de70a.57f2.540d@mx.google.com>
2012-01-04 16:10   ` Grant Erickson
2012-01-04 16:14     ` Tom Rini
2012-01-04 16:28       ` Grant Erickson
2012-01-05  8:44         ` Wolfgang Denk

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