u-boot/include/asm-generic
Eddie Cai 340f418acd spl: Add spl_early_init()
At present malloc_base/_limit/_ptr are not initialised in spl_init() when
we call spl_init() in board_init_f(). This is due to a recent change aimed
at avoiding overwriting the malloc area set up on some boards by
spl_relocate_stack_gd().

However if CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN is not defined, we now
skip setting up the memory area in spl_init() which is obviously wrong.

To fix this, add a new function spl_early_init() which can be called in
board_init_f().

Fixes: b3d2861e (spl: Remove overwrite of relocated malloc limit)
Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Rewrote spl_{,early_}init() to avoid duplicate code:
Rewrite/expand commit message:
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Eddie Cai <eddie.cai.linux@gmail.com>
2017-03-16 16:03:43 -06:00
..
bitops include: Add generic bitops headers 2015-11-05 10:51:57 -05:00
atomic-long.h ubifs: Import atomic_long operations from Linux 2015-01-28 07:42:35 +01:00
bitsperlong.h linux/bitops.h: GENMASK copy from linux 2015-10-21 09:14:07 -04:00
global_data.h spl: Add spl_early_init() 2017-03-16 16:03:43 -06:00
gpio.h dm: gpio: Add methods for open drain setting 2016-06-03 22:13:52 -07:00
ioctl.h x86: Fix support for booting bzImage 2010-05-06 00:17:01 +02:00
sections.h efi: Add support for a hello world test program 2016-11-14 23:24:03 +01:00
signal.h asm-generic/signal.h: import from linux 2010-01-17 20:36:05 -05:00
u-boot.h common: Display >=4GiB memory bank size 2015-08-14 03:24:20 -06:00
unaligned.h asm-generic/unaligned.h: dynamic default unaligned accesses 2010-03-14 00:10:09 +01:00