All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Increase default of CONFIG_SYS_MALLOC_F_LEN for SPL_OF_CONTROL
Date: Tue, 6 Sep 2016 06:46:55 -0600	[thread overview]
Message-ID: <CAPnjgZ3CtT9DFMjCny7VBJGBymyzJq8CoGf2gwXUi0yUabFM1g@mail.gmail.com> (raw)
In-Reply-To: <CAK7LNAS9BoAKLFozCNr038x_x1LG-jw5iQyPWo4eN7T+xBSoRw@mail.gmail.com>

Hi Masahiro,

On 6 September 2016 at 06:24, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> 2016-09-06 10:04 GMT+09:00 Simon Glass <sjg@chromium.org>:
> > On 30 August 2016 at 03:56, Stefan Roese <sr@denx.de> wrote:
> >> On 30.08.2016 11:50, Masahiro Yamada wrote:
> >>>
> >>> If both SPL_DM and SPL_OF_CONTROL are enabled, SPL needs to bind
> >>> several devices, but CONFIG_SYS_MALLOC_F_LEN=0x400 is apparently
> >>> not enough.  Increase the default to 0x2000 for the case.  This
> >>> will be helpful for shorter defconfigs.
> >>>
> >>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> >>
> >>
> >> Reviewed-by: Stefan Roese <sr@denx.de>
> >
> > Reviewed-by: Simon Glass <sjg@chromium.org>
> >
> > It would be worth checking why. I fixed a bug where simple-bus would
> > bring in all devices regardless of the u-boot,dm-pre-reloc flag.
> > Perhaps that was it?
>
> I do not think so.
>
> Recently I tested this.  In spite of "u-boot,dm-pre-reloc"
> in the SPL device tree, my board failed in SPL.
>
> I guess CONFIG_SYS_MALLOC_F_LEN=0x400 is not enough
> for binding/probing UART, pinctrl, MMC in SPL.
>
> I increased the malloc size and it worked fine.

You could turn on DEBUG in common/spl/spl.c and it will print out how
much memory is used. But by making it the default you are affecting a
lot of boards which don't use pinctrl, etc. 8KB is a lot for some
boards.

On the other hand we should make sure that it gives a sensible error
when running out of memory, perhaps something like this:

http://patchwork.ozlabs.org/patch/561551/

Regards,
Simon

  parent reply	other threads:[~2016-09-06 12:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-30  9:50 [U-Boot] [PATCH] Increase default of CONFIG_SYS_MALLOC_F_LEN for SPL_OF_CONTROL Masahiro Yamada
2016-08-30  9:56 ` Stefan Roese
2016-09-06  1:04   ` Simon Glass
2016-09-06 12:24     ` Masahiro Yamada
2016-09-06 12:27       ` Marek Vasut
2016-09-06 12:46       ` Simon Glass [this message]
2016-09-11 12:50         ` Masahiro Yamada
2016-09-12  4:21           ` Simon Glass
2016-09-12  4:42             ` Masahiro Yamada
2016-09-12 13:50               ` Simon Glass
2016-09-07 17:59 ` [U-Boot] " Tom Rini

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=CAPnjgZ3CtT9DFMjCny7VBJGBymyzJq8CoGf2gwXUi0yUabFM1g@mail.gmail.com \
    --to=sjg@chromium.org \
    --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.