sunxi: Switch to using malloc_simple for the spl
authorHans de Goede <hdegoede@redhat.com>
Sun, 13 Sep 2015 10:31:24 +0000 (12:31 +0200)
committerHans de Goede <hdegoede@redhat.com>
Tue, 20 Oct 2015 16:40:27 +0000 (18:40 +0200)
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>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Tom Rini <trini@konsulko.com>
arch/arm/Kconfig
arch/arm/cpu/armv7/sunxi/board.c
include/configs/sunxi-common.h

index 1a7e916..9bc5946 100644 (file)
@@ -523,6 +523,7 @@ config ARCH_SUNXI
        select OF_CONTROL
        select OF_SEPARATE
        select SPL_STACK_R if !MACH_SUN9I
+       select SPL_SYS_MALLOC_SIMPLE if !MACH_SUN9I
        select USB
        select USB_STORAGE
        select USB_KEYBOARD
index d11365b..1d79ba1 100644 (file)
@@ -192,6 +192,7 @@ u32 spl_boot_mode(void)
 
 void board_init_f(ulong dummy)
 {
+       spl_init();
        preloader_console_init();
 
 #ifdef CONFIG_SPL_I2C_SUPPORT
index 2ba21b3..ed7879a 100644 (file)
@@ -77,7 +77,6 @@
  * since it needs to fit in with the other values. By also #defining it
  * we get warnings if the Kconfig value mismatches. */
 #define CONFIG_SPL_STACK_R_ADDR                0x2fe00000
-#define CONFIG_SYS_SPL_MALLOC_START    0x2ff00000
 #define CONFIG_SPL_BSS_START_ADDR      0x2ff80000
 #else
 #define SDRAM_OFFSET(x) 0x4##x
  * since it needs to fit in with the other values. By also #defining it
  * we get warnings if the Kconfig value mismatches. */
 #define CONFIG_SPL_STACK_R_ADDR                0x4fe00000
-#define CONFIG_SYS_SPL_MALLOC_START    0x4ff00000
 #define CONFIG_SPL_BSS_START_ADDR      0x4ff80000
 #endif
 
 #define CONFIG_SPL_BSS_MAX_SIZE                0x00080000 /* 512 KiB */
-#define CONFIG_SYS_SPL_MALLOC_SIZE     0x00080000 /* 512 KiB */
 
 #ifdef CONFIG_MACH_SUN9I
 /*