From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: barebox@lists.infradead.org
Subject: [PATCH 2/2] cfa10036: Retrieve the RAM size at runtime
Date: Tue, 26 Feb 2013 17:55:42 +0100 [thread overview]
Message-ID: <1361897742-3454-3-git-send-email-maxime.ripard@free-electrons.com> (raw)
In-Reply-To: <1361897742-3454-1-git-send-email-maxime.ripard@free-electrons.com>
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 1bc20cf..a112bf1 100644
--- a/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c
+++ b/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c
@@ -92,7 +92,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((volatile long int *)IMX_MEMORY_BASE, SZ_256M));
return 0;
}
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-02-26 16:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-26 16:55 [PATCHv2 0/2] cfa10036: Retrieve " Maxime Ripard
2013-02-26 16:55 ` [PATCH 1/2] memsize: Make get_ram_size RAM proof Maxime Ripard
2013-03-04 8:02 ` Sascha Hauer
2013-03-07 13:52 ` Maxime Ripard
2013-03-07 14:10 ` Juergen Beisert
2013-03-07 14:26 ` Maxime Ripard
2013-02-26 16:55 ` Maxime Ripard [this message]
2013-02-27 8:03 ` [PATCHv2 0/2] cfa10036: Retrieve RAM size at runtime Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1361897742-3454-3-git-send-email-maxime.ripard@free-electrons.com \
--to=maxime.ripard@free-electrons.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox