mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Yegor Yefremov <yegorslists@googlemail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox <barebox@lists.infradead.org>
Subject: Re: [PATCH v2] Add support for Baltos systems
Date: Mon, 13 Jun 2016 09:44:24 +0200	[thread overview]
Message-ID: <CAGm1_ksTsK43q11j8Kw3SYQ_HNAtGDQbgUJE_T9hQsuavJBkuw@mail.gmail.com> (raw)
In-Reply-To: <20160601070826.GJ31666@pengutronix.de>

On Wed, Jun 1, 2016 at 9:08 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Mon, May 30, 2016 at 04:43:50PM +0200, yegorslists@googlemail.com wrote:
>> From: Yegor Yefremov <yegorslists@googlemail.com>
>>
>> OnRISC Baltos devices are based on a am335x SoC and can be booted
>> either from MMC or NAND.
>>
>> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
>> ---
>> Changes:
>>         v2: - remove typedef
>>             - rework invalid EEPROM content handling
>>             - add mmc0 as boot device for MMC boot source
>>
>> +static int baltos_mem_init(void)
>> +{
>> +     uint32_t sdram_size;
>> +
>> +     if (!of_machine_is_compatible("vscom,onrisc"))
>> +             return 0;
>> +
>> +     sdram_size = SZ_256M;
>> +
>> +     arm_add_mem_device("ram0", 0x80000000, sdram_size);
>> +
>> +     return 0;
>> +}
>> +mem_initcall(baltos_mem_init);
>
> This shouldn't be necessary. See arch/arm/mach-omap/am33xx_scrm.c, here
> the correct amount of memory should be registered.

ACK

>> +ENTRY_FUNCTION(start_am33xx_baltos_sdram, r0, r1, r2)
>> +{
>> +     uint32_t sdram_size;
>> +     void *fdt;
>> +
>> +     sdram_size = SZ_256M;
>> +     fdt = __dtb_am335x_baltos_minimal_start;
>> +
>> +     fdt -= get_runtime_offset();
>> +
>> +     barebox_arm_entry(0x80000000, sdram_size, fdt);
>
> am335x_barebox_entry() calculates the SDRAM size automatically for you.
>
> Doing this has the advantage that you can configure your SDRAM as you
> like without having to bother that all other locations where the SDRAM
> size is needed are correct.

This is not working for me. As soon as barebox.bin starts I can see only

barebox 2016.05.0 #3 Mon Jun 13 09:32:01 CEST 2016

Board: OnRISC Baltos

I don't know why, but am335x_sdram_size() always finds 0x20000000 i.e.
512MB on both 256MB modules and 512MB.

I understand only main railway station :-)

Yegor

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

  reply	other threads:[~2016-06-13  7:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-30 14:43 yegorslists
2016-06-01  7:08 ` Sascha Hauer
2016-06-13  7:44   ` Yegor Yefremov [this message]
2016-06-13  8:55     ` Sascha Hauer
2016-06-13  8:56       ` Yegor Yefremov
2016-06-13  9:22         ` Yegor Yefremov

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=CAGm1_ksTsK43q11j8Kw3SYQ_HNAtGDQbgUJE_T9hQsuavJBkuw@mail.gmail.com \
    --to=yegorslists@googlemail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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