u-boot/common/spl
Simon Glass db910353a1 arm: spl: Allow board_init_r() to run with a larger stack
At present SPL uses a single stack, either CONFIG_SPL_STACK or
CONFIG_SYS_INIT_SP_ADDR. Since some SPL features (such as MMC and
environment) require a lot of stack, some boards set CONFIG_SPL_STACK to
point into SDRAM. They then set up SDRAM very early, before board_init_f(),
so that the larger stack can be used.

This is an abuse of lowlevel_init(). That function should only be used for
essential start-up code which cannot be delayed. An example of a valid use is
when only part of the SPL code is visible/executable, and the SoC must be set
up so that board_init_f() can be reached. It should not be used for SDRAM
init, console init, etc.

Add a CONFIG_SPL_STACK_R option, which allows the stack to be moved to a new
address before board_init_r() is called in SPL.

The expected SPL flow (for CONFIG_SPL_FRAMEWORK) is documented in the README.

Signed-off-by: Simon Glass <sjg@chromium.org>
For version 1:
Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Heiko Schocher <hs@denx.de>
Tested-by: Heiko Schocher <hs@denx.de>

Signed-off-by: Tom Rini <trini@konsulko.com>
2015-03-04 14:55:04 -05:00
..
Makefile spl: Add EXT support to SPL 2014-10-27 17:54:03 -04:00
spl.c arm: spl: Allow board_init_r() to run with a larger stack 2015-03-04 14:55:04 -05:00
spl_ext.c spl: Fix SPL EXT support 2014-11-26 11:21:16 -05:00
spl_fat.c spl: do not hang in spl_register_fat_device but return error value. It allows to use both CONFIG_SPL_FAT_SUPPORT and CONFIG_SPL_EXT_SUPPORT. 2014-10-27 17:54:08 -04:00
spl_mmc.c spl: mmc: Fix raw boot mode (related to commit 4c5bbc2328) 2015-01-06 10:10:30 +02:00
spl_nand.c spl, nand: add option to boot raw u-boot.bin image only 2014-11-17 08:47:17 -05:00
spl_net.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
spl_nor.c spl, spl_nor: fix compiler warning 2015-02-16 15:48:34 -05:00
spl_onenand.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
spl_sata.c spl_sata.c: Add <scsi.h> 2015-01-05 21:14:04 -05:00
spl_usb.c Rename some defines containing FAT in their name to be filesystem generic 2014-10-27 11:04:01 -04:00
spl_ymodem.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00