mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org, Brian Lilly <brian@crystalfontz.com>
Subject: Re: [PATCH] cfa10036: Retrieve the RAM size at runtime
Date: Thu, 14 Feb 2013 10:42:01 +0100	[thread overview]
Message-ID: <511CB169.4040108@free-electrons.com> (raw)
In-Reply-To: <20130213170941.GO19322@game.jcrosoft.org>

Hi Jean-Christophe,

Le 13/02/2013 18:09, Jean-Christophe PLAGNIOL-VILLARD a écrit :
> On 17:50 Wed 13 Feb     , Maxime Ripard wrote:
>> 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));
> check the sdram control register instead so you do not need to get_ram_size
> and specify a Max

This is not possible, the first stage bootloader sets up the cs, lines
and rows for 256MB, in every case, so we will always end up with 256MB here.

Maxime

-- 
Maxime Ripard, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

  reply	other threads:[~2013-02-14  9:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-13 16:50 Maxime Ripard
2013-02-13 17:09 ` Jean-Christophe PLAGNIOL-VILLARD
2013-02-14  9:42   ` Maxime Ripard [this message]
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
2013-03-21 15:36 [PATCH] cfa10036: Retrieve the RAM size at runtime Alexandre Belloni
2013-03-25 11:26 ` Maxime Ripard
2013-03-25 12:51 ` Sascha Hauer
2013-03-25 12:58   ` Alexandre Belloni
2013-03-25 13:02     ` Maxime Ripard

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=511CB169.4040108@free-electrons.com \
    --to=maxime.ripard@free-electrons.com \
    --cc=barebox@lists.infradead.org \
    --cc=brian@crystalfontz.com \
    --cc=plagnioj@jcrosoft.com \
    /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