[U-Boot] [PATCH v7 09/29] ARM: SPL: Only call mem_malloc_init if configured

Tom Rini trini at ti.com
Tue Sep 25 02:30:47 CEST 2012


We can only attempt to setup a malloc pool if
CONFIG_SYS_SPL_MALLOC_START is defined, and not all boards require it.
Make the call depend on the define.

Signed-off-by: Tom Rini <trini at ti.com>
---

 arch/arm/cpu/armv7/omap-common/spl.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/cpu/armv7/omap-common/spl.c b/arch/arm/cpu/armv7/omap-common/spl.c
index 4d33f99..71a467e 100644
--- a/arch/arm/cpu/armv7/omap-common/spl.c
+++ b/arch/arm/cpu/armv7/omap-common/spl.c
@@ -149,8 +149,10 @@ void board_init_r(gd_t *id, ulong dummy)
 	u32 boot_device;
 	debug(">>spl:board_init_r()\n");
 
+#ifdef CONFIG_SYS_SPL_MALLOC_START
 	mem_malloc_init(CONFIG_SYS_SPL_MALLOC_START,
 			CONFIG_SYS_SPL_MALLOC_SIZE);
+#endif
 
 #ifdef CONFIG_SPL_BOARD_INIT
 	spl_board_init();
-- 
1.7.9.5



More information about the U-Boot mailing list