summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/Kconfig3
-rw-r--r--arch/arm/cpu/armv7/s5pc1xx/Kconfig2
-rw-r--r--arch/arm/mach-exynos/Kconfig8
-rw-r--r--arch/arm/mach-tegra/Kconfig1
-rw-r--r--common/spl/spl.c2
-rw-r--r--configs/am335x_boneblack_vboot_defconfig1
-rw-r--r--configs/arches_defconfig1
-rw-r--r--configs/canyonlands_defconfig1
-rw-r--r--configs/galileo_defconfig1
-rw-r--r--configs/microblaze-generic_defconfig1
-rw-r--r--configs/odroid_defconfig1
-rw-r--r--configs/origen_defconfig1
-rw-r--r--configs/s5pc210_universal_defconfig1
-rw-r--r--configs/socfpga_arria5_defconfig1
-rw-r--r--configs/socfpga_cyclone5_defconfig1
-rw-r--r--configs/socfpga_socrates_defconfig1
-rw-r--r--configs/trats2_defconfig1
-rw-r--r--configs/trats_defconfig1
-rw-r--r--dts/Kconfig6
-rw-r--r--include/config_uncmd_spl.h2
-rw-r--r--include/fdtdec.h2
-rw-r--r--lib/Makefile8
-rw-r--r--scripts/Makefile.uncmd_spl2
23 files changed, 17 insertions, 32 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 735d971f4e1..a99ae284443 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -658,7 +658,6 @@ config ARCH_SUNXI
select DM_USB
select OF_CONTROL
select OF_SEPARATE
- select SPL_DISABLE_OF_CONTROL
select USB
select USB_STORAGE
select USB_KEYBOARD
@@ -684,7 +683,6 @@ config ARCH_ZYNQ
select CPU_V7
select SUPPORT_SPL
select OF_CONTROL
- select SPL_DISABLE_OF_CONTROL
select DM
select DM_SPI
select DM_SPI_FLASH
@@ -821,7 +819,6 @@ config ARCH_UNIPHIER
select DM
select DM_SERIAL
select DM_I2C
- select SPL_DISABLE_OF_CONTROL
help
Support for UniPhier SoC family developed by Socionext Inc.
(formerly, System LSI Business Division of Panasonic Corporation)
diff --git a/arch/arm/cpu/armv7/s5pc1xx/Kconfig b/arch/arm/cpu/armv7/s5pc1xx/Kconfig
index 792ef595e49..04acdaad79c 100644
--- a/arch/arm/cpu/armv7/s5pc1xx/Kconfig
+++ b/arch/arm/cpu/armv7/s5pc1xx/Kconfig
@@ -7,12 +7,10 @@ choice
config TARGET_S5P_GONI
bool "S5P Goni board"
select OF_CONTROL
- select SPL_DISABLE_OF_CONTROL
config TARGET_SMDKC100
bool "Support smdkc100 board"
select OF_CONTROL
- select SPL_DISABLE_OF_CONTROL
endchoice
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 37b89b00131..a6a75974d73 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -8,7 +8,6 @@ config TARGET_SMDKV310
select SUPPORT_SPL
bool "Exynos4210 SMDKV310 board"
select OF_CONTROL
- select SPL_DISABLE_OF_CONTROL
config TARGET_TRATS
bool "Exynos4210 Trats board"
@@ -29,7 +28,6 @@ config TARGET_ODROID
config TARGET_ODROID_XU3
bool "Exynos5422 Odroid board"
select OF_CONTROL
- select SPL_DISABLE_OF_CONTROL
config TARGET_ARNDALE
bool "Exynos5250 Arndale board"
@@ -37,19 +35,16 @@ config TARGET_ARNDALE
select CPU_V7_HAS_VIRT
select SUPPORT_SPL
select OF_CONTROL
- select SPL_DISABLE_OF_CONTROL
config TARGET_SMDK5250
bool "SMDK5250 board"
select SUPPORT_SPL
select OF_CONTROL
- select SPL_DISABLE_OF_CONTROL
config TARGET_SNOW
bool "Snow board"
select SUPPORT_SPL
select OF_CONTROL
- select SPL_DISABLE_OF_CONTROL
config TARGET_SPRING
bool "Spring board"
@@ -61,19 +56,16 @@ config TARGET_SMDK5420
bool "SMDK5420 board"
select SUPPORT_SPL
select OF_CONTROL
- select SPL_DISABLE_OF_CONTROL
config TARGET_PEACH_PI
bool "Peach Pi board"
select SUPPORT_SPL
select OF_CONTROL
- select SPL_DISABLE_OF_CONTROL
config TARGET_PEACH_PIT
bool "Peach Pit board"
select SUPPORT_SPL
select OF_CONTROL
- select SPL_DISABLE_OF_CONTROL
endchoice
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index ba0b865bb92..a5b7e0d22d2 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -5,7 +5,6 @@ config TEGRA_ARMV7_COMMON
select SUPPORT_SPL
select SPL
select OF_CONTROL
- select SPL_DISABLE_OF_CONTROL
select CPU_V7
select DM
select DM_SPI_FLASH
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 94b01da56ce..45cf92526c1 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -158,7 +158,7 @@ int spl_init(void)
gd->malloc_ptr = 0;
#endif
if (IS_ENABLED(CONFIG_OF_CONTROL) &&
- !IS_ENABLED(CONFIG_SPL_DISABLE_OF_CONTROL)) {
+ IS_ENABLED(CONFIG_SPL_OF_CONTROL)) {
ret = fdtdec_setup();
if (ret) {
debug("fdtdec_setup() returned error %d\n", ret);
diff --git a/configs/am335x_boneblack_vboot_defconfig b/configs/am335x_boneblack_vboot_defconfig
index b141255632e..b52ddfdc7ae 100644
--- a/configs/am335x_boneblack_vboot_defconfig
+++ b/configs/am335x_boneblack_vboot_defconfig
@@ -12,5 +12,4 @@ CONFIG_SYS_EXTRA_OPTIONS="EMMC_BOOT,ENABLE_VBOOT"
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_SETEXPR is not set
CONFIG_OF_CONTROL=y
-CONFIG_SPL_DISABLE_OF_CONTROL=y
CONFIG_SPI_FLASH=y
diff --git a/configs/arches_defconfig b/configs/arches_defconfig
index f979a64560c..9084a3a904f 100644
--- a/configs/arches_defconfig
+++ b/configs/arches_defconfig
@@ -4,4 +4,3 @@ CONFIG_TARGET_CANYONLANDS=y
CONFIG_ARCHES=y
CONFIG_DEFAULT_DEVICE_TREE="arches"
CONFIG_OF_CONTROL=y
-CONFIG_SPL_DISABLE_OF_CONTROL=y
diff --git a/configs/canyonlands_defconfig b/configs/canyonlands_defconfig
index 09172b1dfd7..44d4fbdb9db 100644
--- a/configs/canyonlands_defconfig
+++ b/configs/canyonlands_defconfig
@@ -4,5 +4,4 @@ CONFIG_TARGET_CANYONLANDS=y
CONFIG_CANYONLANDS=y
CONFIG_DEFAULT_DEVICE_TREE="canyonlands"
CONFIG_OF_CONTROL=y
-CONFIG_SPL_DISABLE_OF_CONTROL=y
CONFIG_OF_EMBED=y
diff --git a/configs/galileo_defconfig b/configs/galileo_defconfig
index 3f80483aef9..6ef1090e1ee 100644
--- a/configs/galileo_defconfig
+++ b/configs/galileo_defconfig
@@ -11,7 +11,6 @@ CONFIG_BOOTSTAGE=y
CONFIG_BOOTSTAGE_REPORT=y
CONFIG_CMD_BOOTSTAGE=y
CONFIG_OF_CONTROL=y
-CONFIG_SPL_DISABLE_OF_CONTROL=y
CONFIG_SPI_FLASH=y
CONFIG_NETDEVICES=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/microblaze-generic_defconfig b/configs/microblaze-generic_defconfig
index 5de1bcd89a8..53829d4547a 100644
--- a/configs/microblaze-generic_defconfig
+++ b/configs/microblaze-generic_defconfig
@@ -4,6 +4,5 @@ CONFIG_DEFAULT_DEVICE_TREE="microblaze-generic"
CONFIG_SPL=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_OF_CONTROL=y
-CONFIG_SPL_DISABLE_OF_CONTROL=y
CONFIG_OF_EMBED=y
CONFIG_SYS_PROMPT="U-Boot-mONStR> "
diff --git a/configs/odroid_defconfig b/configs/odroid_defconfig
index 0a4f63b6e0d..5c355ba31d0 100644
--- a/configs/odroid_defconfig
+++ b/configs/odroid_defconfig
@@ -11,7 +11,6 @@ CONFIG_DEFAULT_DEVICE_TREE="exynos4412-odroid"
CONFIG_CMD_PMIC=y
CONFIG_CMD_REGULATOR=y
CONFIG_OF_CONTROL=y
-CONFIG_SPL_DISABLE_OF_CONTROL=y
CONFIG_DM_I2C=y
CONFIG_DM_I2C_COMPAT=y
CONFIG_DM_PMIC=y
diff --git a/configs/origen_defconfig b/configs/origen_defconfig
index d69d497aa61..6ddfc9783b6 100644
--- a/configs/origen_defconfig
+++ b/configs/origen_defconfig
@@ -10,7 +10,6 @@ CONFIG_SPL=y
# CONFIG_CMD_NFS is not set
# CONFIG_CMD_MISC is not set
CONFIG_OF_CONTROL=y
-CONFIG_SPL_DISABLE_OF_CONTROL=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_SYS_PROMPT="ORIGEN # "
diff --git a/configs/s5pc210_universal_defconfig b/configs/s5pc210_universal_defconfig
index 1a49978c70f..36d294c6bdb 100644
--- a/configs/s5pc210_universal_defconfig
+++ b/configs/s5pc210_universal_defconfig
@@ -9,7 +9,6 @@ CONFIG_DEFAULT_DEVICE_TREE="exynos4210-universal_c210"
# CONFIG_CMD_NFS is not set
# CONFIG_CMD_MISC is not set
CONFIG_OF_CONTROL=y
-CONFIG_SPL_DISABLE_OF_CONTROL=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_SYS_PROMPT="Universal # "
diff --git a/configs/socfpga_arria5_defconfig b/configs/socfpga_arria5_defconfig
index 4d1cd21c151..f406db7cfdd 100644
--- a/configs/socfpga_arria5_defconfig
+++ b/configs/socfpga_arria5_defconfig
@@ -6,6 +6,7 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
CONFIG_SPI_FLASH=y
CONFIG_SPL_DM=y
CONFIG_SPL_MMC_SUPPORT=y
diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig
index ae3a1dea911..75207bf5d06 100644
--- a/configs/socfpga_cyclone5_defconfig
+++ b/configs/socfpga_cyclone5_defconfig
@@ -6,6 +6,7 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
CONFIG_SPI_FLASH=y
CONFIG_DM_ETH=y
CONFIG_NETDEVICES=y
diff --git a/configs/socfpga_socrates_defconfig b/configs/socfpga_socrates_defconfig
index 71d47116791..c38f1ab345f 100644
--- a/configs/socfpga_socrates_defconfig
+++ b/configs/socfpga_socrates_defconfig
@@ -6,6 +6,7 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
CONFIG_SPI_FLASH=y
CONFIG_DM_ETH=y
CONFIG_NETDEVICES=y
diff --git a/configs/trats2_defconfig b/configs/trats2_defconfig
index f0dd2b9fa29..4b290db02ce 100644
--- a/configs/trats2_defconfig
+++ b/configs/trats2_defconfig
@@ -10,7 +10,6 @@ CONFIG_DEFAULT_DEVICE_TREE="exynos4412-trats2"
# CONFIG_CMD_NFS is not set
# CONFIG_CMD_MISC is not set
CONFIG_OF_CONTROL=y
-CONFIG_SPL_DISABLE_OF_CONTROL=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_SYS_PROMPT="Trats2 # "
diff --git a/configs/trats_defconfig b/configs/trats_defconfig
index 6412f31f8a8..9c24cae0076 100644
--- a/configs/trats_defconfig
+++ b/configs/trats_defconfig
@@ -9,7 +9,6 @@ CONFIG_DEFAULT_DEVICE_TREE="exynos4210-trats"
# CONFIG_CMD_NFS is not set
# CONFIG_CMD_MISC is not set
CONFIG_OF_CONTROL=y
-CONFIG_SPL_DISABLE_OF_CONTROL=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_SYS_PROMPT="Trats # "
diff --git a/dts/Kconfig b/dts/Kconfig
index 09cfefbd353..d72a90905f5 100644
--- a/dts/Kconfig
+++ b/dts/Kconfig
@@ -14,9 +14,9 @@ config OF_CONTROL
This feature provides for run-time configuration of U-Boot
via a flattened device tree.
-config SPL_DISABLE_OF_CONTROL
- bool "Disable run-time configuration via Device Tree in SPL"
- depends on OF_CONTROL
+config SPL_OF_CONTROL
+ bool "Enable run-time configuration via Device Tree in SPL"
+ depends on SPL && OF_CONTROL
help
Some boards use device tree in U-Boot but only have 4KB of SRAM
which is not enough to support device tree. Enable this option to
diff --git a/include/config_uncmd_spl.h b/include/config_uncmd_spl.h
index 86cc0c3c5d7..2741fc8a8e1 100644
--- a/include/config_uncmd_spl.h
+++ b/include/config_uncmd_spl.h
@@ -20,7 +20,7 @@
#undef CONFIG_CMD_SNTP
#undef CONFIG_CMD_TFTPPUT
#undef CONFIG_CMD_TFTPSRV
-#ifdef CONFIG_SPL_DISABLE_OF_CONTROL
+#ifndef CONFIG_SPL_OF_CONTROL
#undef CONFIG_OF_CONTROL
#endif
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 2ef3f662cc8..5796e272b29 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -46,7 +46,7 @@ struct fdt_memory {
#endif
#ifdef CONFIG_OF_CONTROL
-# if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_DISABLE_OF_CONTROL)
+# if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_OF_CONTROL)
# define OF_CONTROL 0
# else
# define OF_CONTROL 1
diff --git a/lib/Makefile b/lib/Makefile
index db7d9806df8..3b6a74bae72 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -49,7 +49,13 @@ obj-$(CONFIG_BITREVERSE) += bitrev.o
obj-y += list_sort.o
endif
-ifndef CONFIG_SPL_DISABLE_OF_CONTROL
+ifndef CONFIG_SPL_BUILD
+obj-$(CONFIG_OF_LIBFDT) += libfdt/
+obj-$(CONFIG_OF_CONTROL) += fdtdec_common.o
+obj-$(CONFIG_OF_CONTROL) += fdtdec.o
+endif
+
+ifdef CONFIG_SPL_OF_CONTROL
obj-$(CONFIG_OF_LIBFDT) += libfdt/
obj-$(CONFIG_OF_CONTROL) += fdtdec_common.o
obj-$(CONFIG_OF_CONTROL) += fdtdec.o
diff --git a/scripts/Makefile.uncmd_spl b/scripts/Makefile.uncmd_spl
index a0630d1ef12..b90fcb81867 100644
--- a/scripts/Makefile.uncmd_spl
+++ b/scripts/Makefile.uncmd_spl
@@ -3,7 +3,7 @@
# TODO: Invent a better way
ifdef CONFIG_SPL_BUILD
-ifdef CONFIG_SPL_DISABLE_OF_CONTROL
+ifndef CONFIG_SPL_OF_CONTROL
CONFIG_OF_CONTROL=
endif