public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] fdt_support: Use CONFIG_NR_DRAM_BANKS if defined
@ 2013-04-30 20:22 Doug Anderson
  2013-04-30 20:35 ` Tom Rini
  2013-05-22 14:59 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 15+ messages in thread
From: Doug Anderson @ 2013-04-30 20:22 UTC (permalink / raw)
  To: u-boot

It appears that there are some cases where we have more than 4 banks
of memory.  Use CONFIG_NR_DRAM_BANKS if it's defined to handle this.
This will take up a little extra stack space (64 bytes extra if we go
up to 8 banks), but that seems OK.

Signed-off-by: Doug Anderson <dianders@chromium.org>
---
Note: nothing in-tree has 8 banks defined yet, but some configs have
it defined that are not in tree yet.

 common/fdt_support.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/common/fdt_support.c b/common/fdt_support.c
index 812acb4..416100e 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -387,7 +387,11 @@ static void write_cell(u8 *addr, u64 val, int size)
 	}
 }
 
+#ifdef CONFIG_NR_DRAM_BANKS
+#define MEMORY_BANKS_MAX CONFIG_NR_DRAM_BANKS
+#else
 #define MEMORY_BANKS_MAX 4
+#endif
 int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int banks)
 {
 	int err, nodeoffset;
-- 
1.8.2.1

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

end of thread, other threads:[~2013-05-22 14:59 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-30 20:22 [U-Boot] [PATCH] fdt_support: Use CONFIG_NR_DRAM_BANKS if defined Doug Anderson
2013-04-30 20:35 ` Tom Rini
2013-04-30 20:49   ` Doug Anderson
2013-04-30 21:14     ` Tom Rini
2013-05-15 15:58       ` Vadim Bendebury
2013-05-15 16:46         ` Tom Rini
2013-05-15 16:51         ` Doug Anderson
2013-05-17 16:26           ` Doug Anderson
2013-05-17 16:40             ` Tom Rini
2013-05-17 16:48               ` Doug Anderson
2013-05-17 16:52                 ` Tom Rini
2013-05-17 16:59                   ` Doug Anderson
2013-05-17 18:05                     ` Tom Rini
2013-05-17 18:13                       ` Jerry Van Baren
2013-05-22 14:59 ` [U-Boot] " Tom Rini

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