@@ -30,6 +30,7 @@
#include "../common/pfuze.h"
#include <asm/arch/mx6-ddr.h>
#include <usb.h>
+#include <malloc.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -833,6 +834,8 @@ static void spl_dram_init(void)
void board_init_f(ulong dummy)
{
+ void __iomem *ptr;
+
/* setup AIPS and disable watchdog */
arch_cpu_init();
@@ -848,6 +851,12 @@ void board_init_f(ulong dummy)
/* UART clocks enabled and gd valid - init serial console */
preloader_console_init();
+ spl_init();
+
+ ptr = malloc(64);
+ if (!ptr)
+ puts("******* malloc returned NULL\n");
+
/* DDR initialization */
spl_dram_init();
Also, as I just explained to Simon if I remove the ifdefery like this:
@@ -50,11 +50,8 @@ ulong board_init_f_mem(ulong top)
#endif
arch_setup_gd(gd_ptr);
-#if defined(CONFIG_SYS_MALLOC_F) && \
- (!defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SYS_SPL_MALLOC_START))
top -= CONFIG_SYS_MALLOC_F_LEN;
gd->malloc_base = top;
-#endif
return top;
}