of: flip CONFIG_SPL_DISABLE_OF_CONTROL into CONFIG_SPL_OF_CONTROL
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 11 Aug 2015 22:31:54 +0000 (07:31 +0900)
committerTom Rini <trini@konsulko.com>
Tue, 18 Aug 2015 17:46:04 +0000 (13:46 -0400)
As we discussed a couple of times, negative CONFIG options make our
life difficult; CONFIG_SYS_NO_FLASH, CONFIG_SYS_DCACHE_OFF, ...
and here is another one.

Now, there are three boards enabling OF_CONTROL on SPL:
 - socfpga_arria5_defconfig
 - socfpga_cyclone5_defconfig
 - socfpga_socrates_defconfig

This commit adds CONFIG_SPL_OF_CONTROL for them and deletes
CONFIG_SPL_DISABLE_OF_CONTROL from the other boards to invert
the logic.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
23 files changed:
arch/arm/Kconfig
arch/arm/cpu/armv7/s5pc1xx/Kconfig
arch/arm/mach-exynos/Kconfig
arch/arm/mach-tegra/Kconfig
common/spl/spl.c
configs/am335x_boneblack_vboot_defconfig
configs/arches_defconfig
configs/canyonlands_defconfig
configs/galileo_defconfig
configs/microblaze-generic_defconfig
configs/odroid_defconfig
configs/origen_defconfig
configs/s5pc210_universal_defconfig
configs/socfpga_arria5_defconfig
configs/socfpga_cyclone5_defconfig
configs/socfpga_socrates_defconfig
configs/trats2_defconfig
configs/trats_defconfig
dts/Kconfig
include/config_uncmd_spl.h
include/fdtdec.h
lib/Makefile
scripts/Makefile.uncmd_spl

index 735d971f4e14d3c58ebe80202efd1c4735710c71..a99ae2844432d56abbc84af7e329bde89f551890 100644 (file)
@@ -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)
index 792ef595e4919570590c06d5c5bb89c52d4d6b2a..04acdaad79ce4d4320e8f757f0a3cee89815b8c0 100644 (file)
@@ -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
 
index 37b89b00131ecb396ddb849e73df2dfe7593f919..a6a75974d7321080c655ef7539e5556c9f554933 100644 (file)
@@ -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
 
index ba0b865bb92c9bda0730128ac85edfd540faa947..a5b7e0d22d29e034e5ee42f7dca52a3dc23911ed 100644 (file)
@@ -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
index 94b01da56ce92bdef79eb5ed8cbd043271a2a17b..45cf92526c12f6812c904c0a8d604d2965178ea7 100644 (file)
@@ -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);
index b141255632ee12413fb9eca0756228bca5ca5584..b52ddfdc7aefd4941f024c2a4f359d1ac8947051 100644 (file)
@@ -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
index f979a64560ccc2fe3357a6e4093d4e475ea8f894..9084a3a904f198fc220665b1dc44b0f03788f4a5 100644 (file)
@@ -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
index 09172b1dfd7e9cf48df1a496c894519911700b16..44d4fbdb9dbfa37f0dfb48e011fe6221dfefd2b3 100644 (file)
@@ -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
index 3f80483aef96704b8aad7dad01e76966e421688d..6ef1090e1ee965a56b4305315ec3f18b3d1d33c7 100644 (file)
@@ -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
index 5de1bcd89a8b887467f7293292676158079502b1..53829d4547a39499ba8c3f67262328d6eb9a5499 100644 (file)
@@ -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> "
index 0a4f63b6e0d2e0cf512c82efa035df3867efd330..5c355ba31d0312c1ff6e27cffa48133144d3d617 100644 (file)
@@ -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
index d69d497aa6166fbb62000d430ef255df607e8acb..6ddfc9783b6495def3c7bddf952899db4ab617f2 100644 (file)
@@ -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 # "
index 1a49978c70fb5d00e26e18012ca5aa22fde4446d..36d294c6bdb6cda8abf845742e01cb2598ad5ca1 100644 (file)
@@ -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 # "
index 4d1cd21c1510b726fcc0c4e7d3f96cd3b0959df6..f406db7cfdd4b9f221a0d75fbb9500e5b0418b70 100644 (file)
@@ -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
index ae3a1dea91197b3c7e2a7487f73a790b3e8eb9ea..75207bf5d06422a936807df8deaf2f161dfc5dfe 100644 (file)
@@ -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
index 71d47116791a041dd996a877143dbe1c810a47e7..c38f1ab345f27603fab45b02a53f2e7c651352ae 100644 (file)
@@ -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
index f0dd2b9fa292203036d27cdc810d964bce812912..4b290db02ce86f144c7b1bfa87857736b1a39241 100644 (file)
@@ -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 # "
index 6412f31f8a8b493c1ee443960406d0aa8c893f87..9c24cae007654acdf2a63ece9f8bc5985d03eb94 100644 (file)
@@ -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 # "
index 09cfefbd35358adb5335fea0f2dc53eda94be99e..d72a90905f5b95ca7de5e10aebb863761ceecf84 100644 (file)
@@ -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
index 86cc0c3c5d70efc2c3088fdad0bf9e8714919129..2741fc8a8e10f990f6abaae0fe4bee9daa7b24f4 100644 (file)
@@ -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
 
index 2ef3f662cc87c36b7371f16c37c237a42e3650dc..5796e272b29c71cc27be4a36e7503a489dfbf33d 100644 (file)
@@ -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
index db7d9806df88b8243d26b1a0ff89b44d9ec743da..3b6a74bae72cb622bfa6485568fbed90765e5132 100644 (file)
@@ -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
index a0630d1ef12d49e58998c7902ac2e4d2d8418c6c..b90fcb8186716fff17f7f15ab02038d0635c045f 100644 (file)
@@ -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