summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAneesh V <aneesh@ti.com>2011-10-21 12:29:34 -0400
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2011-10-27 21:56:35 +0200
commit2d01dd953a269e5fc27e04cb8571e0d8d81c7c4a (patch)
treea11c87dc6b9a6cad090a01455cb6269f39eaa0ee /arch
parentcc3f7058435c94acaaf9111340437a0a4c018de6 (diff)
omap: spl: fix build break due to changes in FAT
FAT library now uses malloc() and free(). But SPL doesn't have heap until now. Setup a heap in SDRAM to fix this issue. However this increases SPL footprint beyond the available SRAM budget. So, compile out some fancy features in the SDARM init bring back footprint under control CC: Sandeep Paulraj <s-paulraj@ti.com> CC: Wolfgang Denk <wd@denx.de> Signed-off-by: Aneesh V <aneesh@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/armv7/omap-common/spl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/omap-common/spl.c b/arch/arm/cpu/armv7/omap-common/spl.c
index d0866c03d0..d37ca0ff5a 100644
--- a/arch/arm/cpu/armv7/omap-common/spl.c
+++ b/arch/arm/cpu/armv7/omap-common/spl.c
@@ -34,6 +34,7 @@
#include <asm/arch/mmc_host_def.h>
#include <i2c.h>
#include <image.h>
+#include <malloc.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -105,6 +106,9 @@ void board_init_r(gd_t *id, ulong dummy)
u32 boot_device;
debug(">>spl:board_init_r()\n");
+ mem_malloc_init(CONFIG_SYS_SPL_MALLOC_START,
+ CONFIG_SYS_SPL_MALLOC_SIZE);
+
timer_init();
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);