public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] ARM, SPL: gd / sp setup mostly omap (and sunxi)
@ 2014-09-27 18:58 Jeroen Hofstee
  0 siblings, 0 replies; only message in thread
From: Jeroen Hofstee @ 2014-09-27 18:58 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-09-27 18:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-27 18:58 [U-Boot] ARM, SPL: gd / sp setup mostly omap (and sunxi) Jeroen Hofstee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox