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 735d971..a99ae28 100644 (file)
@@ -658,7 +658,6 @@ config ARCH_SUNXI
        select DM_USB
        select OF_CONTROL
        select OF_SEPARATE
        select DM_USB
        select OF_CONTROL
        select OF_SEPARATE
-       select SPL_DISABLE_OF_CONTROL
        select USB
        select USB_STORAGE
        select USB_KEYBOARD
        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 CPU_V7
        select SUPPORT_SPL
        select OF_CONTROL
-       select SPL_DISABLE_OF_CONTROL
        select DM
        select DM_SPI
        select DM_SPI_FLASH
        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 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)
        help
          Support for UniPhier SoC family developed by Socionext Inc.
          (formerly, System LSI Business Division of Panasonic Corporation)
index 792ef59..04acdaa 100644 (file)
@@ -7,12 +7,10 @@ choice
 config TARGET_S5P_GONI
        bool "S5P Goni board"
        select OF_CONTROL
 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
 
 config TARGET_SMDKC100
        bool "Support smdkc100 board"
        select OF_CONTROL
-       select SPL_DISABLE_OF_CONTROL
 
 endchoice
 
 
 endchoice
 
index 37b89b0..a6a7597 100644 (file)
@@ -8,7 +8,6 @@ config TARGET_SMDKV310
        select SUPPORT_SPL
        bool "Exynos4210 SMDKV310 board"
        select OF_CONTROL
        select SUPPORT_SPL
        bool "Exynos4210 SMDKV310 board"
        select OF_CONTROL
-       select SPL_DISABLE_OF_CONTROL
 
 config TARGET_TRATS
        bool "Exynos4210 Trats board"
 
 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
 config TARGET_ODROID_XU3
        bool "Exynos5422 Odroid board"
        select OF_CONTROL
-       select SPL_DISABLE_OF_CONTROL
 
 config TARGET_ARNDALE
        bool "Exynos5250 Arndale board"
 
 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 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
 
 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
 
 config TARGET_SNOW
        bool "Snow board"
        select SUPPORT_SPL
        select OF_CONTROL
-       select SPL_DISABLE_OF_CONTROL
 
 config TARGET_SPRING
        bool "Spring board"
 
 config TARGET_SPRING
        bool "Spring board"
@@ -61,19 +56,16 @@ config TARGET_SMDK5420
        bool "SMDK5420 board"
        select SUPPORT_SPL
        select OF_CONTROL
        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
 
 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
 
 config TARGET_PEACH_PIT
        bool "Peach Pit board"
        select SUPPORT_SPL
        select OF_CONTROL
-       select SPL_DISABLE_OF_CONTROL
 
 endchoice
 
 
 endchoice
 
index ba0b865..a5b7e0d 100644 (file)
@@ -5,7 +5,6 @@ config TEGRA_ARMV7_COMMON
        select SUPPORT_SPL
        select SPL
        select OF_CONTROL
        select SUPPORT_SPL
        select SPL
        select OF_CONTROL
-       select SPL_DISABLE_OF_CONTROL
        select CPU_V7
        select DM
        select DM_SPI_FLASH
        select CPU_V7
        select DM
        select DM_SPI_FLASH
index 94b01da..45cf925 100644 (file)
@@ -158,7 +158,7 @@ int spl_init(void)
        gd->malloc_ptr = 0;
 #endif
        if (IS_ENABLED(CONFIG_OF_CONTROL) &&
        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);
                ret = fdtdec_setup();
                if (ret) {
                        debug("fdtdec_setup() returned error %d\n", ret);
index b141255..b52ddfd 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_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
 CONFIG_SPI_FLASH=y
index f979a64..9084a3a 100644 (file)
@@ -4,4 +4,3 @@ CONFIG_TARGET_CANYONLANDS=y
 CONFIG_ARCHES=y
 CONFIG_DEFAULT_DEVICE_TREE="arches"
 CONFIG_OF_CONTROL=y
 CONFIG_ARCHES=y
 CONFIG_DEFAULT_DEVICE_TREE="arches"
 CONFIG_OF_CONTROL=y
-CONFIG_SPL_DISABLE_OF_CONTROL=y
index 09172b1..44d4fbd 100644 (file)
@@ -4,5 +4,4 @@ CONFIG_TARGET_CANYONLANDS=y
 CONFIG_CANYONLANDS=y
 CONFIG_DEFAULT_DEVICE_TREE="canyonlands"
 CONFIG_OF_CONTROL=y
 CONFIG_CANYONLANDS=y
 CONFIG_DEFAULT_DEVICE_TREE="canyonlands"
 CONFIG_OF_CONTROL=y
-CONFIG_SPL_DISABLE_OF_CONTROL=y
 CONFIG_OF_EMBED=y
 CONFIG_OF_EMBED=y
index 3f80483..6ef1090 100644 (file)
@@ -11,7 +11,6 @@ CONFIG_BOOTSTAGE=y
 CONFIG_BOOTSTAGE_REPORT=y
 CONFIG_CMD_BOOTSTAGE=y
 CONFIG_OF_CONTROL=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
 CONFIG_SPI_FLASH=y
 CONFIG_NETDEVICES=y
 CONFIG_ETH_DESIGNWARE=y
index 5de1bcd..53829d4 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=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> "
 CONFIG_OF_EMBED=y
 CONFIG_SYS_PROMPT="U-Boot-mONStR> "
index 0a4f63b..5c355ba 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_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
 CONFIG_DM_I2C=y
 CONFIG_DM_I2C_COMPAT=y
 CONFIG_DM_PMIC=y
index d69d497..6ddfc97 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_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 # "
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_SYS_PROMPT="ORIGEN # "
index 1a49978..36d294c 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_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 # "
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_SYS_PROMPT="Universal # "
index 4d1cd21..f406db7 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_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
 CONFIG_SPI_FLASH=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_MMC_SUPPORT=y
index ae3a1de..75207bf 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_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
 CONFIG_SPI_FLASH=y
 CONFIG_DM_ETH=y
 CONFIG_NETDEVICES=y
index 71d4711..c38f1ab 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_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
 CONFIG_SPI_FLASH=y
 CONFIG_DM_ETH=y
 CONFIG_NETDEVICES=y
index f0dd2b9..4b290db 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_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 # "
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_SYS_PROMPT="Trats2 # "
index 6412f31..9c24cae 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_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 # "
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_SYS_PROMPT="Trats # "
index 09cfefb..d72a909 100644 (file)
@@ -14,9 +14,9 @@ config OF_CONTROL
          This feature provides for run-time configuration of U-Boot
          via a flattened device tree.
 
          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
        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 86cc0c3..2741fc8 100644 (file)
@@ -20,7 +20,7 @@
 #undef CONFIG_CMD_SNTP
 #undef CONFIG_CMD_TFTPPUT
 #undef CONFIG_CMD_TFTPSRV
 #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
 
 #undef CONFIG_OF_CONTROL
 #endif
 
index 2ef3f66..5796e27 100644 (file)
@@ -46,7 +46,7 @@ struct fdt_memory {
 #endif
 
 #ifdef CONFIG_OF_CONTROL
 #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
 #  define OF_CONTROL 0
 # else
 #  define OF_CONTROL 1
index db7d980..3b6a74b 100644 (file)
@@ -49,7 +49,13 @@ obj-$(CONFIG_BITREVERSE) += bitrev.o
 obj-y += list_sort.o
 endif
 
 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
 obj-$(CONFIG_OF_LIBFDT) += libfdt/
 obj-$(CONFIG_OF_CONTROL) += fdtdec_common.o
 obj-$(CONFIG_OF_CONTROL) += fdtdec.o
index a0630d1..b90fcb8 100644 (file)
@@ -3,7 +3,7 @@
 # TODO: Invent a better way
 
 ifdef CONFIG_SPL_BUILD
 # TODO: Invent a better way
 
 ifdef CONFIG_SPL_BUILD
-ifdef CONFIG_SPL_DISABLE_OF_CONTROL
+ifndef CONFIG_SPL_OF_CONTROL
 CONFIG_OF_CONTROL=
 endif
 
 CONFIG_OF_CONTROL=
 endif