malloc_f: enable SYS_MALLOC_F by default if DM is on

This option has a bool type, not hex.
Fix it and enable it if CONFIG_DM is on because Driver Model always
requires malloc memory.  Devices are scanned twice, before/after
relocation.  CONFIG_SYS_MALLOC_F should be enabled to use malloc
memory before relocation.  As it is board-independent, handle it
globally.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Robert Baldyga <r.baldyga@samsung.com>
This commit is contained in:
Masahiro Yamada 2015-03-19 19:42:55 +09:00 committed by Tom Rini
parent 91405b7fa9
commit 326a682358
30 changed files with 1 additions and 46 deletions

View File

@ -54,7 +54,7 @@ config CC_OPTIMIZE_FOR_SIZE
config SYS_MALLOC_F
bool "Enable malloc() pool before relocation"
default 0x400
default y if DM
help
Before relocation memory is very limited on many platforms. Still,
we can provide a small malloc() pool if needed. Driver model in

View File

@ -80,9 +80,6 @@ config DM_SPI_FLASH
config DM_GPIO
default y
config SYS_MALLOC_F
default y
source "board/samsung/smdkv310/Kconfig"
source "board/samsung/trats/Kconfig"
source "board/samsung/universal_c210/Kconfig"

View File

@ -106,9 +106,6 @@ config DM_GPIO
config DM_SERIAL
default y if DM
config SYS_MALLOC_F
default y if DM
config SYS_SOC
default "omap3"

View File

@ -17,9 +17,6 @@ config TEGRA124
endchoice
config SYS_MALLOC_F
default y
config SYS_MALLOC_F_LEN
default 0x1800

View File

@ -45,9 +45,6 @@ config DCC_MICRO_SUPPORT_CARD
endchoice
config SYS_MALLOC_F
default y
config CMD_PINMON
bool "Enable boot mode pins monitor command"
default y

View File

@ -76,9 +76,6 @@ config DM_GPIO
config DM_SERIAL
default y
config SYS_MALLOC_F
default y
config SYS_MALLOC_F_LEN
default 0x800

View File

@ -39,8 +39,4 @@ config DM
config DM_SERIAL
default y
config SYS_MALLOC_F
bool
default y
endif

View File

@ -47,7 +47,4 @@ config DM_GPIO
config DM_SERIAL
default y if DM
config SYS_MALLOC_F
default y if DM
endif

View File

@ -13,4 +13,3 @@ CONFIG_MACH_SUN7I=y
CONFIG_DRAM_CLK=480
CONFIG_DRAM_ZQ=122
CONFIG_DRAM_EMR1=4
CONFIG_SYS_MALLOC_F=y

View File

@ -3,4 +3,3 @@ CONFIG_SPL_STACK_R=y
CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_ARM=y
CONFIG_TARGET_AM335X_IGEP0033=y
CONFIG_SYS_MALLOC_F=y

View File

@ -5,4 +5,3 @@ CONFIG_TARGET_CM_FX6=y
CONFIG_DM=y
CONFIG_DM_GPIO=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_MALLOC_F=y

View File

@ -1,4 +1,3 @@
CONFIG_SPL=y
CONFIG_ARM=y
CONFIG_TARGET_CM_T335=y
CONFIG_SYS_MALLOC_F=y

View File

@ -1,6 +1,5 @@
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/mx6dl.cfg,MX6DL"
CONFIG_ARM=y
CONFIG_TARGET_MX6QSABREAUTO=y
CONFIG_SYS_MALLOC_F=y
CONFIG_DM=y
CONFIG_DM_THERMAL=y

View File

@ -1,6 +1,5 @@
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/imximage.cfg,MX6Q"
CONFIG_ARM=y
CONFIG_TARGET_MX6QSABREAUTO=y
CONFIG_SYS_MALLOC_F=y
CONFIG_DM=y
CONFIG_DM_THERMAL=y

View File

@ -1,6 +1,5 @@
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sabresd/mx6q_4x_mt41j128.cfg,MX6Q"
CONFIG_ARM=y
CONFIG_TARGET_MX6SABRESD=y
CONFIG_SYS_MALLOC_F=y
CONFIG_DM=y
CONFIG_DM_THERMAL=y

View File

@ -1,6 +1,5 @@
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sxsabresd/imximage.cfg,MX6SX"
CONFIG_ARM=y
CONFIG_TARGET_MX6SXSABRESD=y
CONFIG_SYS_MALLOC_F=y
CONFIG_DM=y
CONFIG_DM_THERMAL=y

View File

@ -4,4 +4,3 @@ CONFIG_TARGET_NOKIA_RX51=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n
CONFIG_SYS_MALLOC_F=y

View File

@ -2,4 +2,3 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="REV1"
CONFIG_ARM=y
CONFIG_TARGET_PCM051=y
CONFIG_SYS_MALLOC_F=y

View File

@ -2,4 +2,3 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="REV3"
CONFIG_ARM=y
CONFIG_TARGET_PCM051=y
CONFIG_SYS_MALLOC_F=y

View File

@ -1,4 +1,3 @@
CONFIG_SPL=y
CONFIG_ARM=y
CONFIG_TARGET_PENGWYN=y
CONFIG_SYS_MALLOC_F=y

View File

@ -1,4 +1,3 @@
CONFIG_SPL=y
CONFIG_ARM=y
CONFIG_TARGET_PEPPER=y
CONFIG_SYS_MALLOC_F=y

View File

@ -1,3 +1,2 @@
CONFIG_ARM=y
CONFIG_TARGET_RPI_2=y
CONFIG_SYS_MALLOC_F=y

View File

@ -1,3 +1,2 @@
CONFIG_ARM=y
CONFIG_TARGET_RPI=y
CONFIG_SYS_MALLOC_F=y

View File

@ -2,4 +2,3 @@ CONFIG_ARM=y
CONFIG_ARCH_S5PC1XX=y
CONFIG_TARGET_S5P_GONI=y
CONFIG_DEFAULT_DEVICE_TREE="s5pc1xx-goni"
CONFIG_SYS_MALLOC_F=y

View File

@ -5,7 +5,6 @@ CONFIG_FIT_VERBOSE=y
CONFIG_FIT_SIGNATURE=y
CONFIG_DM=y
CONFIG_DEFAULT_DEVICE_TREE="sandbox"
CONFIG_SYS_MALLOC_F=y
CONFIG_CROS_EC=y
CONFIG_DM_CROS_EC=y
CONFIG_CROS_EC_SANDBOX=y

View File

@ -2,4 +2,3 @@ CONFIG_ARM=y
CONFIG_TARGET_SMDKC100=y
CONFIG_ARCH_S5PC1XX=y
CONFIG_DEFAULT_DEVICE_TREE="s5pc1xx-smdkc100"
CONFIG_SYS_MALLOC_F=y

View File

@ -5,4 +5,3 @@ CONFIG_TARGET_SNAPPER9260=y
CONFIG_DM=y
CONFIG_DM_GPIO=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_MALLOC_F=y

View File

@ -5,4 +5,3 @@ CONFIG_TARGET_SNAPPER9260=y
CONFIG_DM=y
CONFIG_DM_GPIO=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_MALLOC_F=y

View File

@ -1,7 +1,6 @@
CONFIG_SYS_EXTRA_OPTIONS="stv0991"
CONFIG_ARM=y
CONFIG_TARGET_STV0991=y
CONFIG_SYS_MALLOC_F=y
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_DM=y
CONFIG_DM_SERIAL=y

View File

@ -35,8 +35,6 @@
#define CONFIG_SYS_THUMB_BUILD
#define CONFIG_SYS_GENERIC_BOARD
#define CONFIG_SYS_MALLOC_F_LEN (1 << 10)
/* Support File sytems */
#define CONFIG_FAT_WRITE
#define CONFIG_DOS_PARTITION