Browse Source

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>
tags/2020-06-01
Masahiro Yamada 6 years ago
committed by Tom Rini
parent
commit
326a682358
30 changed files with 1 additions and 46 deletions
  1. +1
    -1
      Kconfig
  2. +0
    -3
      arch/arm/cpu/armv7/exynos/Kconfig
  3. +0
    -3
      arch/arm/cpu/armv7/omap3/Kconfig
  4. +0
    -3
      arch/arm/mach-tegra/Kconfig
  5. +0
    -3
      arch/arm/mach-uniphier/Kconfig
  6. +0
    -3
      arch/x86/Kconfig
  7. +0
    -4
      board/amcc/canyonlands/Kconfig
  8. +0
    -3
      board/ti/am335x/Kconfig
  9. +0
    -1
      configs/Linksprite_pcDuino3_fdt_defconfig
  10. +0
    -1
      configs/am335x_igep0033_defconfig
  11. +0
    -1
      configs/cm_fx6_defconfig
  12. +0
    -1
      configs/cm_t335_defconfig
  13. +0
    -1
      configs/mx6dlsabreauto_defconfig
  14. +0
    -1
      configs/mx6qsabreauto_defconfig
  15. +0
    -1
      configs/mx6qsabresd_defconfig
  16. +0
    -1
      configs/mx6sxsabresd_defconfig
  17. +0
    -1
      configs/nokia_rx51_defconfig
  18. +0
    -1
      configs/pcm051_rev1_defconfig
  19. +0
    -1
      configs/pcm051_rev3_defconfig
  20. +0
    -1
      configs/pengwyn_defconfig
  21. +0
    -1
      configs/pepper_defconfig
  22. +0
    -1
      configs/rpi_2_defconfig
  23. +0
    -1
      configs/rpi_defconfig
  24. +0
    -1
      configs/s5p_goni_defconfig
  25. +0
    -1
      configs/sandbox_defconfig
  26. +0
    -1
      configs/smdkc100_defconfig
  27. +0
    -1
      configs/snapper9260_defconfig
  28. +0
    -1
      configs/snapper9g20_defconfig
  29. +0
    -1
      configs/stv0991_defconfig
  30. +0
    -2
      include/configs/rcar-gen2-common.h

+ 1
- 1
Kconfig 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


+ 0
- 3
arch/arm/cpu/armv7/exynos/Kconfig 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"


+ 0
- 3
arch/arm/cpu/armv7/omap3/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"



+ 0
- 3
arch/arm/mach-tegra/Kconfig View File

@@ -17,9 +17,6 @@ config TEGRA124

endchoice

config SYS_MALLOC_F
default y

config SYS_MALLOC_F_LEN
default 0x1800



+ 0
- 3
arch/arm/mach-uniphier/Kconfig 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


+ 0
- 3
arch/x86/Kconfig 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



+ 0
- 4
board/amcc/canyonlands/Kconfig View File

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

config SYS_MALLOC_F
bool
default y

endif

+ 0
- 3
board/ti/am335x/Kconfig 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

+ 0
- 1
configs/Linksprite_pcDuino3_fdt_defconfig 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

+ 0
- 1
configs/am335x_igep0033_defconfig 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

+ 0
- 1
configs/cm_fx6_defconfig 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

+ 0
- 1
configs/cm_t335_defconfig View File

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

+ 0
- 1
configs/mx6dlsabreauto_defconfig 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

+ 0
- 1
configs/mx6qsabreauto_defconfig 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

+ 0
- 1
configs/mx6qsabresd_defconfig 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

+ 0
- 1
configs/mx6sxsabresd_defconfig 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

+ 0
- 1
configs/nokia_rx51_defconfig 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

+ 0
- 1
configs/pcm051_rev1_defconfig 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

+ 0
- 1
configs/pcm051_rev3_defconfig 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

+ 0
- 1
configs/pengwyn_defconfig View File

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

+ 0
- 1
configs/pepper_defconfig View File

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

+ 0
- 1
configs/rpi_2_defconfig View File

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

+ 0
- 1
configs/rpi_defconfig View File

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

+ 0
- 1
configs/s5p_goni_defconfig 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

+ 0
- 1
configs/sandbox_defconfig 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


+ 0
- 1
configs/smdkc100_defconfig 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

+ 0
- 1
configs/snapper9260_defconfig 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

+ 0
- 1
configs/snapper9g20_defconfig 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

+ 0
- 1
configs/stv0991_defconfig 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

+ 0
- 2
include/configs/rcar-gen2-common.h 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