All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeroen Hofstee <jeroen@myspectrum.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] ARM, SPL: gd / sp setup mostly omap (and sunxi)
Date: Sat, 27 Sep 2014 20:58:39 +0200	[thread overview]
Message-ID: <542708DF.8040506@myspectrum.nl> (raw)

Hi,

In the clang serie I left out the changes regarding gd [well
almost all, besides one just to brick Toms board ;), and for the
record not intentionally], since they are not a clang problem, it
might need some general cleanup.

On ARM/omap there are several points setting up sp / gd:

- arch/arm/cpu/armv7/lowlevel_init.S sets both of them before
calling s_init.
- arch/arm/cpu/armv7/omap3/lowlevel_init.S doesn't setup gd,
so omap boards typically setup their own gd again.
- arch/arm/lib/crt0.S setups both of them again.
- the board_init_f in SPL typically sets gd again.
- the common/board_f.c used to set it again (fixed)
- the common/board_r.c used to set it again (fixed)

And to make it more interesting, they don't point to the same
location perse. My preference would be to only do this once,
preferably by calling main as soon as possible. As far as I can
see this should not cause any problem. e.g. We could add a
system_init_f in boards_f.c and arch/arm/lib/spl.c so it gets
called after sp and gd are valid, so they don't have to do their
own magic.

Perhaps I am missing something, comments are welcome.

Regards,
Jeroen

                 reply	other threads:[~2014-09-27 18:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=542708DF.8040506@myspectrum.nl \
    --to=jeroen@myspectrum.nl \
    --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.