All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: crt0: Pass malloc base address
Date: Wed, 11 Nov 2015 19:24:44 -0200	[thread overview]
Message-ID: <CAOMZO5AWiaVEdF9phpPhM-93J2fjiyOV0FLb+QhWYR8nFNm7DQ@mail.gmail.com> (raw)
In-Reply-To: <CAPnjgZ0YogSyx1VYTNznGJOVjsZrXFe+2n49GY9k3h_NeMx83Q@mail.gmail.com>

Hi Simon,

On Wed, Nov 11, 2015 at 7:08 PM, Simon Glass <sjg@chromium.org> wrote:

> That test is intended to avoid setting up simple malloc() if we plan
> to use full malloc() in SPL. Of course, full malloc() is set up a
> little later (in spl_init()). But we should not need both - either we
> use simple malloc() or full malloc().
>
> But for your board I see:
>
> $ grep CONFIG_SYS_SPL_MALLOC_SIZE b/mx6sabresd_spl/u-boot.cfg
> #define CONFIG_SYS_SPL_MALLOC_SIZE 0x3200000
>
> So you will not be able to use simple malloc(). I'd suggest calling
> spl_init() from board_init_f() if you need malloc() there. But it

Yes, I do call spl_init() from board_init_f() prior to calling
malloc() and this has been working fine prior to 5ba534d247d418.

> presumably needs to be done after you have SDRAM up. So perhaps

The trick here is that I need malloc to work prior to have SDRAM configured.

On cgtqmx6eval we need to read SPI NOR to determine what kind of DDR
we will need to configure.

Otavio has sent the SPL support for cgtqmx6eval, but it has not
reached U-boot mainline yet.

I am reproducing the problem on a mx6sabresd_spl target with the
simple example code I sent previously.

Regards,

Fabio Estevam

  reply	other threads:[~2015-11-11 21:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-11 20:23 [U-Boot] [PATCH] ARM: crt0: Pass malloc base address Fabio Estevam
2015-11-11 20:26 ` Simon Glass
2015-11-11 20:41   ` Fabio Estevam
2015-11-11 21:00     ` Fabio Estevam
2015-11-11 21:08       ` Simon Glass
2015-11-11 21:24         ` Fabio Estevam [this message]
2015-11-11 21:49           ` Simon Glass
2015-11-12  6:57             ` Albert ARIBAUD
2015-11-12 12:48               ` Fabio Estevam
2015-11-12 15:59               ` Simon Glass
2015-11-12 16:13                 ` Albert ARIBAUD
2015-11-14  2:12                   ` Simon Glass
2015-11-14 15:23                     ` Albert ARIBAUD
2015-11-11 20:33 ` Albert ARIBAUD
2015-11-11 20:49   ` Fabio Estevam

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=CAOMZO5AWiaVEdF9phpPhM-93J2fjiyOV0FLb+QhWYR8nFNm7DQ@mail.gmail.com \
    --to=festevam@gmail.com \
    --cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.