[U-Boot] [RFC 0/3] ARM: cleanup gd init

Jeroen Hofstee jeroen at myspectrum.nl
Sat Aug 24 18:32:40 CEST 2013


Hello,

As I noticed at [1] gd is setup multiple times. As pointed
Tom pointed out out me this actually leads to problems as
well, see [2]. These patches attempt to cleanup gd usage
(a bit, board_f.c is not included since that one is rather
trivial), some questions I have about it:

1) The major one, do these init changes brick any board?
2) Is there any board which needs gdata as a global?
3) What to do with lowlevel_init on armv7. Hide it under
a CONFIG_*, make it weak.. or just remove it completely?
4) Keep the s_init in crt0.S or move it to the board_init_f?
The disadvantage of the later is that all the different
board_init_f's need to call system_init.
5) Where to put the __weak s_init (or hide this under a define)

Regards,
Jeroen

[1] http://lists.denx.de/pipermail/u-boot/2013-August/160933.html
[2] http://lists.denx.de/pipermail/u-boot/2013-July/158144.html

Jeroen Hofstee (3):
  ARM,crt0.S: call s_init instead from ctr0.S
  ARM,crt0.S: optional init gd to gdata for spl
  ARM: do not assign gd outside of crt0.S

 arch/arm/cpu/arm926ejs/davinci/spl.c           |  3 +--
 arch/arm/cpu/armv7/exynos/spl_boot.c           |  6 ++----
 arch/arm/cpu/armv7/lowlevel_init.S             | 23 +----------------------
 arch/arm/cpu/armv7/omap-common/hwinit-common.c |  2 --
 arch/arm/cpu/armv7/omap3/board.c               |  2 --
 arch/arm/cpu/armv7/omap3/lowlevel_init.S       |  8 ++++----
 arch/arm/cpu/armv7/rmobile/lowlevel_init.S     |  6 ------
 arch/arm/lib/crt0.S                            |  8 ++++++++
 arch/arm/lib/reset.c                           |  5 +++++
 arch/arm/lib/spl.c                             |  5 ++---
 board/isee/igep0033/board.c                    |  1 -
 board/phytec/pcm051/board.c                    |  2 --
 board/ti/am335x/board.c                        |  2 --
 board/ti/omap5912osk/lowlevel_init.S           | 11 -----------
 board/ti/ti814x/evm.c                          |  2 --
 board/woodburn/woodburn.c                      |  3 ---
 16 files changed, 23 insertions(+), 66 deletions(-)

-- 
1.8.1.2



More information about the U-Boot mailing list