From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Date: Sun, 28 Dec 2014 09:09:18 +0000 Subject: [U-Boot] [PATCH 0/9] Remove use of gdata for global_data In-Reply-To: <1419361499-31967-1-git-send-email-sjg@chromium.org> References: <1419361499-31967-1-git-send-email-sjg@chromium.org> Message-ID: <1419757758.13595.21.camel@hellion.org.uk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, 2014-12-23 at 12:04 -0700, Simon Glass wrote: > 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. Did you test both FEL and regular mode? (IOW, to what extent do I need to refresh my memory on the differences between the two...) > 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(-) >