mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] cfa10036: Retrieve the RAM size at runtime
@ 2013-02-13 16:50 Maxime Ripard
  2013-02-13 17:09 ` Jean-Christophe PLAGNIOL-VILLARD
  2013-02-13 17:16 ` [PATCH] Add warning above get_ram_size Sascha Hauer
  0 siblings, 2 replies; 10+ messages in thread
From: Maxime Ripard @ 2013-02-13 16:50 UTC (permalink / raw)
  To: barebox; +Cc: Brian Lilly

The cfa-10036 comes in two flavours, with either 128MB or 256MB of RAM
on it.

Since it's not stored anywhere, we need to runtime detect it, thanks to
the get_ram_size function.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 arch/arm/boards/crystalfontz-cfa10036/cfa10036.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c b/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c
index 1821b10..47a9520 100644
--- a/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c
+++ b/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c
@@ -91,7 +91,8 @@ static struct i2c_gpio_platform_data i2c_gpio_pdata = {
 
 static int cfa10036_mem_init(void)
 {
-	arm_add_mem_device("ram0", IMX_MEMORY_BASE, 128 * 1024 * 1024);
+	arm_add_mem_device("ram0", IMX_MEMORY_BASE,
+			get_ram_size(IMX_MEMORY_BASE, 256 * SZ_1M));
 
 	return 0;
 }
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2013-02-16 15:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-13 16:50 [PATCH] cfa10036: Retrieve the RAM size at runtime Maxime Ripard
2013-02-13 17:09 ` Jean-Christophe PLAGNIOL-VILLARD
2013-02-14  9:42   ` Maxime Ripard
2013-02-13 17:16 ` [PATCH] Add warning above get_ram_size Sascha Hauer
2013-02-14  9:40   ` Maxime Ripard
2013-02-14 11:35     ` Sascha Hauer
2013-02-14 13:59       ` Maxime Ripard
2013-02-14 19:13         ` Sascha Hauer
2013-02-16  8:45           ` Re[2]: " Alexander Shiyan
2013-02-16 15:53             ` Jean-Christophe PLAGNIOL-VILLARD

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