]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
spl: Remove bogus GD_FLG_SPL_INIT check
authorMarek Vasut <marex@denx.de>
Mon, 30 May 2016 15:10:53 +0000 (17:10 +0200)
committerMarek Vasut <marex@denx.de>
Wed, 1 Jun 2016 20:44:14 +0000 (22:44 +0200)
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 <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Pavel Machek <pavel@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Stephen Warren <swarren@nvidia.com>
common/spl/spl.c

index bdde71691887f3f8d461b0b3e46bd3159468b940..8b10bdfe77f0811100bba8fde1bfa1ab99fe0529 100644 (file)
@@ -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;