public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] spl: Remove bogus GD_FLG_SPL_INIT check
@ 2016-05-30 15:22 Marek Vasut
  2016-05-30 15:22 ` [U-Boot] [PATCH 2/2] arm: socfpga: Enable tiny printf and simple malloc in SPL Marek Vasut
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Marek Vasut @ 2016-05-30 15:22 UTC (permalink / raw)
  To: u-boot

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 | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index bdde716..8b10bdf 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;
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-05-31 21:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-30 15:22 [U-Boot] [PATCH 1/2] spl: Remove bogus GD_FLG_SPL_INIT check Marek Vasut
2016-05-30 15:22 ` [U-Boot] [PATCH 2/2] arm: socfpga: Enable tiny printf and simple malloc in SPL Marek Vasut
2016-05-30 16:39   ` Stefan Roese
2016-05-31  0:34     ` Chin Liang See
2016-05-31 21:13       ` Marek Vasut
2016-05-31 14:58   ` Sylvain Lesne
2016-05-31 15:42     ` Marek Vasut
2016-05-31 17:43       ` Sylvain Lesne
2016-05-31 19:38         ` Marek Vasut
2016-05-31 20:39   ` Pavel Machek
2016-05-30 16:39 ` [U-Boot] [PATCH 1/2] spl: Remove bogus GD_FLG_SPL_INIT check Stefan Roese
2016-05-31  0:34   ` Chin Liang See
2016-05-31 20:40 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox