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>
 
 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
 
 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"
 
 config DM_SERIAL
        default y if DM
 
-config SYS_MALLOC_F
-       default y if DM
-
 config SYS_SOC
        default "omap3"
 
 
 
 endchoice
 
-config SYS_MALLOC_F
-       default y
-
 config SYS_MALLOC_F_LEN
        default 0x1800
 
 
 
 endchoice
 
-config SYS_MALLOC_F
-       default y
-
 config CMD_PINMON
        bool "Enable boot mode pins monitor command"
        default y
 
 config DM_SERIAL
        default y
 
-config SYS_MALLOC_F
-       default y
-
 config SYS_MALLOC_F_LEN
        default 0x800
 
 
 config DM_SERIAL
        default y
 
-config SYS_MALLOC_F
-       bool
-       default y
-
 endif
 
 config DM_SERIAL
        default y if DM
 
-config SYS_MALLOC_F
-       default y if DM
-
 endif
 
 CONFIG_DRAM_CLK=480
 CONFIG_DRAM_ZQ=122
 CONFIG_DRAM_EMR1=4
-CONFIG_SYS_MALLOC_F=y
 
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_ARM=y
 CONFIG_TARGET_AM335X_IGEP0033=y
-CONFIG_SYS_MALLOC_F=y
 
 CONFIG_DM=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_SERIAL=y
-CONFIG_SYS_MALLOC_F=y
 
 CONFIG_SPL=y
 CONFIG_ARM=y
 CONFIG_TARGET_CM_T335=y
-CONFIG_SYS_MALLOC_F=y
 
 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
 
 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
 
 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
 
 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
 
 CONFIG_DM=n
 CONFIG_DM_SERIAL=n
 CONFIG_DM_GPIO=n
-CONFIG_SYS_MALLOC_F=y
 
 CONFIG_SYS_EXTRA_OPTIONS="REV1"
 CONFIG_ARM=y
 CONFIG_TARGET_PCM051=y
-CONFIG_SYS_MALLOC_F=y
 
 CONFIG_SYS_EXTRA_OPTIONS="REV3"
 CONFIG_ARM=y
 CONFIG_TARGET_PCM051=y
-CONFIG_SYS_MALLOC_F=y
 
 CONFIG_SPL=y
 CONFIG_ARM=y
 CONFIG_TARGET_PENGWYN=y
-CONFIG_SYS_MALLOC_F=y
 
 CONFIG_SPL=y
 CONFIG_ARM=y
 CONFIG_TARGET_PEPPER=y
-CONFIG_SYS_MALLOC_F=y
 
 CONFIG_ARM=y
 CONFIG_TARGET_RPI_2=y
-CONFIG_SYS_MALLOC_F=y
 
 CONFIG_ARM=y
 CONFIG_TARGET_RPI=y
-CONFIG_SYS_MALLOC_F=y
 
 CONFIG_ARCH_S5PC1XX=y
 CONFIG_TARGET_S5P_GONI=y
 CONFIG_DEFAULT_DEVICE_TREE="s5pc1xx-goni"
-CONFIG_SYS_MALLOC_F=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
 
 CONFIG_TARGET_SMDKC100=y
 CONFIG_ARCH_S5PC1XX=y
 CONFIG_DEFAULT_DEVICE_TREE="s5pc1xx-smdkc100"
-CONFIG_SYS_MALLOC_F=y
 
 CONFIG_DM=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_SERIAL=y
-CONFIG_SYS_MALLOC_F=y
 
 CONFIG_DM=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_SERIAL=y
-CONFIG_SYS_MALLOC_F=y
 
 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
 
 #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