]> Git Repo - u-boot.git/commit
arm: spl: Allow board_init_r() to run with a larger stack
authorSimon Glass <[email protected]>
Tue, 3 Mar 2015 15:03:00 +0000 (08:03 -0700)
committerTom Rini <[email protected]>
Wed, 4 Mar 2015 19:55:04 +0000 (14:55 -0500)
commitdb910353a126d84fe8dff7a694ea792f50fcfb6a
tree0cca558754e992284820fbc240690c13d0a00cb0
parentbdfb34167f73afc7e04d52499fc14bc1cd33fec0
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 <[email protected]>
For version 1:
Acked-by: Albert ARIBAUD <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
Tested-by: Bo Shen <[email protected]>
Acked-by: Bo Shen <[email protected]>
Acked-by: Heiko Schocher <[email protected]>
Tested-by: Heiko Schocher <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
Kconfig
README
arch/arm/lib/crt0.S
common/spl/spl.c
This page took 0.037699 seconds and 4 git commands to generate.