From 1254667689a5a4accc149fef6ff69da760001b2b Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 30 May 2016 17:10:53 +0200 Subject: spl: Remove bogus GD_FLG_SPL_INIT check Remove the check for GD_FLG_SPL_INIT in spl_relocate_stack_gd(). The check will always fail. This is because spl_relocate_stack_gd() is called from ARM's crt0.S and it is called before board_init_r(). The board_init_r() calls spl_init(), which sets the GD_FLG_SPL_INIT flag. Note that reserving the malloc area in RAM is not a problem even if the GD_FLG_SPL_INIT flag is not set. Signed-off-by: Marek Vasut Cc: Chin Liang See Cc: Dinh Nguyen Cc: Hans de Goede Cc: Pavel Machek Cc: Stefan Roese Cc: Stephen Warren --- common/spl/spl.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'common') diff --git a/common/spl/spl.c b/common/spl/spl.c index bdde716918..8b10bdfe77 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -486,9 +486,6 @@ ulong spl_relocate_stack_gd(void) #ifdef CONFIG_SPL_SYS_MALLOC_SIMPLE if (CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN) { - if (!(gd->flags & GD_FLG_SPL_INIT)) - panic_str("spl_init must be called before heap reloc"); - ptr -= CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN; gd->malloc_base = ptr; gd->malloc_limit = CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN; -- cgit v1.2.1