diff mbox

[U-Boot,4/4] sunxi: Switch to using malloc_simple for the spl

Message ID 1423051551-948-5-git-send-email-hdegoede@redhat.com
State Deferred
Delegated to: Hans de Goede
Headers show

Commit Message

Hans de Goede Feb. 4, 2015, 12:05 p.m. UTC
common/dlmalloc.c is quite big, both in .text and .data usage. E.g. for a
Mele_M9 sun6i board build this reduces .text from 0x4214 to 0x3b94 bytes, and
.data from 0x54c to 0x144 bytes.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 include/configs/sunxi-common.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Simon Glass Feb. 5, 2015, 3:05 a.m. UTC | #1
On 4 February 2015 at 05:05, Hans de Goede <hdegoede@redhat.com> wrote:
> common/dlmalloc.c is quite big, both in .text and .data usage. E.g. for a
> Mele_M9 sun6i board build this reduces .text from 0x4214 to 0x3b94 bytes, and
> .data from 0x54c to 0x144 bytes.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  include/configs/sunxi-common.h | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox

Patch

diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 33c0614..b0a360e 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -18,6 +18,7 @@ 
  */
 #define CONFIG_SUNXI		/* sunxi family */
 #ifdef CONFIG_SPL_BUILD
+#define CONFIG_SYS_MALLOC_SIMPLE
 #ifndef CONFIG_SPL_FEL
 #define CONFIG_SYS_THUMB_BUILD	/* Thumbs mode to save space in SPL */
 #endif
@@ -180,8 +181,8 @@ 
 /* end of 32 KiB in sram */
 #define LOW_LEVEL_SRAM_STACK		0x00008000 /* End of sram */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
-#define CONFIG_SYS_SPL_MALLOC_START	0x4ff00000
-#define CONFIG_SYS_SPL_MALLOC_SIZE	0x00080000	/* 512 KiB */
+#define CONFIG_SYS_MALLOC_F_BASE	0x4ff00000
+#define CONFIG_SYS_MALLOC_F_LEN		0x00080000	/* 512 KiB */
 
 /* I2C */
 #if defined CONFIG_AXP152_POWER || defined CONFIG_AXP209_POWER