u-boot-brain/arch
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
..
arc arc: introduce U-Boot port for ARCv2 ISA 2015-02-13 09:17:51 +03:00
arm arm: spl: Allow board_init_r() to run with a larger stack 2015-03-04 14:55:04 -05:00
avr32 avr32: add generic board support 2015-02-17 22:54:38 +01:00
blackfin Export redesign 2015-01-29 17:09:57 -07:00
m68k m68k: remove TASREG board 2015-01-13 09:37:21 -05:00
microblaze microblaze: spl: Add LISTS to linker script 2015-02-09 15:13:12 +01:00
mips MIPS: unify CPU code in arch/mips/cpu/ 2015-01-30 14:19:58 +01:00
nds32 common: Move dram_init() declaration to common location 2015-02-09 15:08:48 +01:00
nios2 Kbuild: introduce Makefile in arch/$ARCH/ 2014-12-08 09:35:45 -05:00
openrisc Kbuild: introduce Makefile in arch/$ARCH/ 2014-12-08 09:35:45 -05:00
powerpc common/board_f: factor out reserve_stacks 2015-02-17 22:52:42 +01:00
sandbox Merge branch 'sandbox' of git://git.denx.de/u-boot-x86 2015-02-16 08:37:22 -05:00
sh sh: enable CONFIG_USE_PRIVATE_LIBGCC by default 2015-02-25 13:57:56 +09:00
sparc Kbuild: introduce Makefile in arch/$ARCH/ 2014-12-08 09:35:45 -05:00
x86 dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to Kconfig 2015-02-12 15:17:28 -07:00
.gitignore .gitignore: drop include/asm/proc from ignore pattern 2014-06-19 11:18:54 -04:00
Kconfig powerpc: Permit device tree control of U-Boot (CONFIG_OF_CONTROL) 2015-02-12 10:35:30 -07:00