public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/9] Remove use of gdata for global_data
@ 2014-12-23 19:04 Simon Glass
  2014-12-23 19:04 ` [U-Boot] [PATCH 1/9] arm: Add warnings about using gdata Simon Glass
                   ` (10 more replies)
  0 siblings, 11 replies; 41+ messages in thread
From: Simon Glass @ 2014-12-23 19:04 UTC (permalink / raw)
  To: u-boot

Some ARM boards use global_data in SPL before it set up by crt0.S. To
achieve this they use a separate global_data variable called gdata which
resides in the data section. The one set up by crt0.S is generally ignored.

This prevents crt0.S from setting up things like the early malloc() pool.
It therefore prevents driver model from being used in SPL.

However gdata really isn't needed. In fact lowlevel_init() is called just
before board_init_f() so, for SPL at least, there is no point in doing
anything before board_init_f(). The one slightly messy area is that SPL
may want to move the stack from SRAM to SDRAM at some point. But this should
be done at the end of board_init_f() (or before board_init_r() is called)
and is not a reason to init DRAM before board_init_f().

It isn't that difficult to get rid of gdata. This series builds on Tom Rini's
recent series for omap3, and extends it to the other offenders: imx, sunxi
and zynq.

I have tested so far only on sunxi. This series is available at u-boot-dm
branch 'gd-working'.


Simon Glass (9):
  arm: Add warnings about using gdata
  sunxi: Move SPL s_init() code to board_init_f()
  sunxi: Drop use of lowlevel_init()
  arm: Reduce the scope of lowlevel_init()
  zynq: Remove reference to gdata
  imx: cm_fx6: Remove reference to gdata
  imx: woodburn: Remove reference to gdata
  imx: ls102xa: Remove reference to gdata
  arm: Drop gdata global_data variable in SPL

 arch/arm/cpu/armv7/lowlevel_init.S      | 23 +++++++-----
 arch/arm/cpu/armv7/sunxi/board.c        | 66 ++++++++++++++++-----------------
 arch/arm/cpu/armv7/zynq/spl.c           |  3 --
 arch/arm/include/asm/spl.h              |  2 -
 arch/arm/lib/spl.c                      | 11 +++---
 board/compulab/cm_fx6/spl.c             |  1 -
 board/freescale/ls1021aqds/ls1021aqds.c |  3 --
 board/freescale/ls1021atwr/ls1021atwr.c |  3 --
 board/woodburn/woodburn.c               |  3 --
 include/configs/sunxi-common.h          |  1 +
 10 files changed, 53 insertions(+), 63 deletions(-)

-- 
2.2.0.rc0.207.ga3a616c

^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2015-02-04  4:14 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-23 19:04 [U-Boot] [PATCH 0/9] Remove use of gdata for global_data Simon Glass
2014-12-23 19:04 ` [U-Boot] [PATCH 1/9] arm: Add warnings about using gdata Simon Glass
2014-12-24  6:53   ` Igor Grinberg
2014-12-29 16:24     ` Simon Glass
2014-12-30  7:39       ` Igor Grinberg
2014-12-30 22:12         ` Simon Glass
2015-01-20 21:40   ` [U-Boot] [U-Boot,1/9] " Tom Rini
2014-12-23 19:04 ` [U-Boot] [PATCH 2/9] sunxi: Move SPL s_init() code to board_init_f() Simon Glass
2014-12-28  9:19   ` Ian Campbell
2014-12-29 16:15     ` Simon Glass
2015-01-30 17:53       ` Siarhei Siamashka
2015-02-01 16:29         ` Simon Glass
2015-02-01 16:45           ` Siarhei Siamashka
2015-02-01 17:00             ` Simon Glass
2015-02-01 18:37               ` Siarhei Siamashka
2015-02-01 20:59                 ` Simon Glass
2015-02-02  8:07                   ` Hans de Goede
2015-02-03  5:29                     ` Simon Glass
2015-02-04  0:55                       ` Simon Glass
2015-02-04  1:58                         ` Siarhei Siamashka
2015-02-04  3:23                           ` Simon Glass
2015-02-04  4:14                             ` Simon Glass
2015-01-20 21:40   ` [U-Boot] [U-Boot, " Tom Rini
2014-12-23 19:04 ` [U-Boot] [PATCH 3/9] sunxi: Drop use of lowlevel_init() Simon Glass
2014-12-28  9:10   ` Ian Campbell
2015-01-20 21:40   ` [U-Boot] [U-Boot,3/9] " Tom Rini
2014-12-23 19:04 ` [U-Boot] [PATCH 4/9] arm: Reduce the scope " Simon Glass
2014-12-23 19:04 ` [U-Boot] [PATCH 5/9] zynq: Remove reference to gdata Simon Glass
2015-01-20 21:40   ` [U-Boot] [U-Boot,5/9] " Tom Rini
2014-12-23 19:04 ` [U-Boot] [PATCH 6/9] imx: cm_fx6: " Simon Glass
2014-12-24  6:50   ` Igor Grinberg
2014-12-31 12:25   ` Nikita Kiryanov
2015-01-20 21:40   ` [U-Boot] [U-Boot,6/9] " Tom Rini
2014-12-23 19:04 ` [U-Boot] [PATCH 7/9] imx: woodburn: " Simon Glass
2014-12-30 12:10   ` Stefano Babic
2015-01-20 21:40   ` [U-Boot] [U-Boot,7/9] " Tom Rini
2014-12-23 19:04 ` [U-Boot] [PATCH 8/9] imx: ls102xa: " Simon Glass
2015-01-20 21:40   ` [U-Boot] [U-Boot,8/9] " Tom Rini
2014-12-23 19:04 ` [U-Boot] [PATCH 9/9] arm: Drop gdata global_data variable in SPL Simon Glass
2014-12-28  9:09 ` [U-Boot] [PATCH 0/9] Remove use of gdata for global_data Ian Campbell
2015-01-19  6:48 ` Albert ARIBAUD

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