All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v4 0/6] kconfig: turnaround into single .config
@ 2015-02-20 17:09 Masahiro Yamada
  2015-02-20 17:09 ` [U-Boot] [PATCH v4 1/6] ARM: UniPhier: set CONFIG_SYS_MALLOC_F to the global default value Masahiro Yamada
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Masahiro Yamada @ 2015-02-20 17:09 UTC (permalink / raw)
  To: u-boot


Masahiro Yamada (5):
  ARM: UniPhier: set CONFIG_SYS_MALLOC_F to the global default value
  malloc_f: fix broken .config caused by CONFIG_SYS_MALLOC_F
  kconfig: switch to single .config configuration
  kconfig: remove unneeded dependency on !SPL_BUILD
  malloc_f: enable SYS_MALLOC_F by default if DM is on

Simon Glass (1):
  kconfig: Adjust ordering so that defaults work as expected

 Kconfig                                 |  31 +---
 arch/arm/Kconfig                        |   7 +-
 arch/arm/cpu/arm1176/bcm2835/Kconfig    |   6 +-
 arch/arm/cpu/armv7/exynos/Kconfig       |  30 ++--
 arch/arm/cpu/armv7/omap3/Kconfig        |  12 +-
 arch/arm/cpu/armv7/s5pc1xx/Kconfig      |   4 +-
 arch/arm/cpu/armv7/tegra-common/Kconfig |  19 +--
 arch/arm/cpu/armv7/uniphier/Kconfig     |   8 -
 arch/x86/Kconfig                        |   5 +-
 board/amcc/canyonlands/Kconfig          |   8 -
 board/compulab/cm_t335/Kconfig          |   6 +-
 board/gumstix/pepper/Kconfig            |   6 +-
 board/isee/igep0033/Kconfig             |   6 +-
 board/phytec/pcm051/Kconfig             |   6 +-
 board/samsung/goni/Kconfig              |   6 +-
 board/samsung/smdkc100/Kconfig          |   6 +-
 board/silica/pengwyn/Kconfig            |   6 +-
 board/ti/am335x/Kconfig                 |  12 +-
 common/Kconfig                          |   1 -
 config.mk                               |   5 +
 configs/ph1_ld4_defconfig               |   2 +-
 configs/ph1_pro4_defconfig              |   2 +-
 configs/ph1_sld8_defconfig              |   2 +-
 doc/README.kconfig                      | 132 ++++------------
 drivers/core/Kconfig                    |  16 +-
 drivers/mtd/nand/Kconfig                |   6 +-
 dts/Kconfig                             |   1 -
 include/config_uncmd_spl.h              |  13 ++
 scripts/Makefile.autoconf               |  36 +++--
 scripts/Makefile.build                  |   3 +-
 scripts/Makefile.spl                    |  10 +-
 scripts/Makefile.uncmd_spl              |  18 +++
 scripts/multiconfig.sh                  | 261 +-------------------------------
 33 files changed, 180 insertions(+), 512 deletions(-)
 create mode 100644 scripts/Makefile.uncmd_spl

-- 
1.9.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v4 1/6] ARM: UniPhier: set CONFIG_SYS_MALLOC_F to the global default value
  2015-02-20 17:09 [U-Boot] [PATCH v4 0/6] kconfig: turnaround into single .config Masahiro Yamada
@ 2015-02-20 17:09 ` Masahiro Yamada
  2015-02-20 17:09 ` [U-Boot] [PATCH v4 2/6] malloc_f: fix broken .config caused by CONFIG_SYS_MALLOC_F Masahiro Yamada
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Masahiro Yamada @ 2015-02-20 17:09 UTC (permalink / raw)
  To: u-boot

It is true that malloc is necessary for Driver Model before
relocation, but there is no good reason to reserve the malloc
space more than enough.  The default value 0x400 works well.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2: None

 arch/arm/cpu/armv7/uniphier/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/cpu/armv7/uniphier/Kconfig b/arch/arm/cpu/armv7/uniphier/Kconfig
index 1a47ac9..8fdef28 100644
--- a/arch/arm/cpu/armv7/uniphier/Kconfig
+++ b/arch/arm/cpu/armv7/uniphier/Kconfig
@@ -52,7 +52,7 @@ config SYS_MALLOC_F
 	default y
 
 config SYS_MALLOC_F_LEN
-	default 0x2000
+	default 0x400
 
 config CMD_PINMON
 	bool "Enable boot mode pins monitor command"
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v4 2/6] malloc_f: fix broken .config caused by CONFIG_SYS_MALLOC_F
  2015-02-20 17:09 [U-Boot] [PATCH v4 0/6] kconfig: turnaround into single .config Masahiro Yamada
  2015-02-20 17:09 ` [U-Boot] [PATCH v4 1/6] ARM: UniPhier: set CONFIG_SYS_MALLOC_F to the global default value Masahiro Yamada
@ 2015-02-20 17:09 ` Masahiro Yamada
  2015-02-20 17:09 ` [U-Boot] [PATCH v4 3/6] kconfig: Adjust ordering so that defaults work as expected Masahiro Yamada
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Masahiro Yamada @ 2015-02-20 17:09 UTC (permalink / raw)
  To: u-boot

Since commit b724bd7d6349 (dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN
to Kconfig), the ".config" created by the configuration has been
wrong.

For example, the following is a snippet of the ".config" generated
by "make beaver_defconfig":

  --------------->8-----------------
  CONFIG_CC_OPTIMIZE_FOR_SIZE=y
  # CONFIG_SYS_MALLOC_F is not set
  CONFIG_SYS_MALLOC_F_LEN=0x1800
  # CONFIG_EXPERT is not set
  ---------------8<-----------------

CONFIG_SYS_MALLOC_F_LEN is supposed to depend on CONFIG_SYS_MALLOC_F
(see the top level Kconfig), but the ".config" above is not actually
following that dependency.

This is caused by two mistakes of commit b724bd7d6349.

[1] Wrong default value of CONFIG_SYS_MALLOC_F
  CONFIG_SYS_MALLOC_F is a boolean option, but its default value is
  set to 0x400.

[2] Missing "if SYS_MALLOC_F" in the default setting in each Kconfig
  For example, arch/arm/cpu/armv7/tegra-common/Kconfig has the line
  "default 0x1800" for SYS_MALLOC_F_LEN.  It must be described as
  "default 0x1800 if SYS_MALLOC_F" to follow the dependency.

Those two bugs together create such a broken ".config".

Unfortunately, even if we correct both [1] and [2], the value of
CONFIG_SYS_MALLOC_F_LEN is not set as we expect.
The "default 0x1800 if SYS_MALLOC_F" would be simply ignored because
the "default 0x400" in the top level Kconfig is parsed first.

Notice that if multiple default lines appear for the same CONFIG,
the first one takes precedence.

This commit corrects [1] and [2] so as not to create a broken
.config file in any cases.  Note that the default values in
arch/arm/cpu/armv7/tegra-common/Kconfig and arch/x86/Kconfig are not
working at this moment.  This will be solved by the next commit.

The default value 0x400 is redundant for OMAP, Exynos, UniPhier, etc.
They can be simply removed.

There are still redundant "CONFIG_SYS_MALLOC_F_LEN=0x400" in many
defconfig files, but this commit is not touching them.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

Changes in v3:
  - Drop comments "This is meaningless ..."
  - Update commit description

Changes in v2: None

 Kconfig                                 | 1 -
 arch/arm/cpu/armv7/exynos/Kconfig       | 3 ---
 arch/arm/cpu/armv7/omap3/Kconfig        | 3 ---
 arch/arm/cpu/armv7/tegra-common/Kconfig | 2 +-
 arch/arm/cpu/armv7/uniphier/Kconfig     | 3 ---
 arch/x86/Kconfig                        | 2 +-
 board/amcc/canyonlands/Kconfig          | 4 ----
 board/ti/am335x/Kconfig                 | 3 ---
 8 files changed, 2 insertions(+), 19 deletions(-)

diff --git a/Kconfig b/Kconfig
index 75bab7f..d40f9ec 100644
--- a/Kconfig
+++ b/Kconfig
@@ -58,7 +58,6 @@ config CC_OPTIMIZE_FOR_SIZE
 
 config SYS_MALLOC_F
 	bool "Enable malloc() pool before relocation"
-	default 0x400
 	help
 	  Before relocation memory is very limited on many platforms. Still,
 	  we can provide a small malloc() pool if needed. Driver model in
diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig
index 2064efa..23869ce 100644
--- a/arch/arm/cpu/armv7/exynos/Kconfig
+++ b/arch/arm/cpu/armv7/exynos/Kconfig
@@ -83,9 +83,6 @@ config DM_GPIO
 config SYS_MALLOC_F
 	default y if !SPL_BUILD
 
-config SYS_MALLOC_F_LEN
-	default 0x400 if !SPL_BUILD
-
 source "board/samsung/smdkv310/Kconfig"
 source "board/samsung/trats/Kconfig"
 source "board/samsung/universal_c210/Kconfig"
diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig
index 4644098..2e193ab 100644
--- a/arch/arm/cpu/armv7/omap3/Kconfig
+++ b/arch/arm/cpu/armv7/omap3/Kconfig
@@ -105,9 +105,6 @@ config DM_SERIAL
 config SYS_MALLOC_F
 	default y if DM && !SPL_BUILD
 
-config SYS_MALLOC_F_LEN
-	default 0x400 if DM && !SPL_BUILD
-
 config SYS_SOC
 	default "omap3"
 
diff --git a/arch/arm/cpu/armv7/tegra-common/Kconfig b/arch/arm/cpu/armv7/tegra-common/Kconfig
index ee32469..8b51558 100644
--- a/arch/arm/cpu/armv7/tegra-common/Kconfig
+++ b/arch/arm/cpu/armv7/tegra-common/Kconfig
@@ -21,7 +21,7 @@ config SYS_MALLOC_F
 	default y
 
 config SYS_MALLOC_F_LEN
-	default 0x1800
+	default 0x1800 if SYS_MALLOC_F
 
 config USE_PRIVATE_LIBGCC
 	default y if SPL_BUILD
diff --git a/arch/arm/cpu/armv7/uniphier/Kconfig b/arch/arm/cpu/armv7/uniphier/Kconfig
index 8fdef28..371b274 100644
--- a/arch/arm/cpu/armv7/uniphier/Kconfig
+++ b/arch/arm/cpu/armv7/uniphier/Kconfig
@@ -51,9 +51,6 @@ endchoice
 config SYS_MALLOC_F
 	default y
 
-config SYS_MALLOC_F_LEN
-	default 0x400
-
 config CMD_PINMON
 	bool "Enable boot mode pins monitor command"
 	default y
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 35d24e4..65909e7 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -80,7 +80,7 @@ config SYS_MALLOC_F
 	default y
 
 config SYS_MALLOC_F_LEN
-	default 0x800
+	default 0x800 if SYS_MALLOC_F
 
 config RAMBASE
 	hex
diff --git a/board/amcc/canyonlands/Kconfig b/board/amcc/canyonlands/Kconfig
index 848e08f..c0dbd18 100644
--- a/board/amcc/canyonlands/Kconfig
+++ b/board/amcc/canyonlands/Kconfig
@@ -43,8 +43,4 @@ config SYS_MALLOC_F
 	bool
 	default y
 
-config SYS_MALLOC_F_LEN
-	hex
-	default 0x400
-
 endif
diff --git a/board/ti/am335x/Kconfig b/board/ti/am335x/Kconfig
index a20e0c1..cad10c2 100644
--- a/board/ti/am335x/Kconfig
+++ b/board/ti/am335x/Kconfig
@@ -50,7 +50,4 @@ config DM_SERIAL
 config SYS_MALLOC_F
 	default y if DM && !SPL_BUILD
 
-config SYS_MALLOC_F_LEN
-	default 0x400 if DM && !SPL_BUILD
-
 endif
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v4 3/6] kconfig: Adjust ordering so that defaults work as expected
  2015-02-20 17:09 [U-Boot] [PATCH v4 0/6] kconfig: turnaround into single .config Masahiro Yamada
  2015-02-20 17:09 ` [U-Boot] [PATCH v4 1/6] ARM: UniPhier: set CONFIG_SYS_MALLOC_F to the global default value Masahiro Yamada
  2015-02-20 17:09 ` [U-Boot] [PATCH v4 2/6] malloc_f: fix broken .config caused by CONFIG_SYS_MALLOC_F Masahiro Yamada
@ 2015-02-20 17:09 ` Masahiro Yamada
  2015-02-20 17:09 ` [U-Boot] [PATCH v4 4/6] kconfig: switch to single .config configuration Masahiro Yamada
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Masahiro Yamada @ 2015-02-20 17:09 UTC (permalink / raw)
  To: u-boot

From: Simon Glass <sjg@chromium.org>

At present defaults in arch-specific Kconfig files are ignored if the
top-level item comes ahead of it in include order. This means that it is
not possible to have a U-Boot default that architectures and boards can
override. This does not seem very useful.

Move the include earlier to support this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

Changes in v3:
  - The same as what Simon posted
    http://patchwork.ozlabs.org/patch/441670/
    Included in this series to clarify the order

Changes in v2: None

 Kconfig | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Kconfig b/Kconfig
index d40f9ec..351e5c9 100644
--- a/Kconfig
+++ b/Kconfig
@@ -12,6 +12,9 @@ config KCONFIG_OBJDIR
 	string
 	option env="KCONFIG_OBJDIR"
 
+# Allow defaults in arch-specific code to override any given here
+source "arch/Kconfig"
+
 menu "General setup"
 
 config LOCALVERSION
@@ -171,8 +174,6 @@ config SYS_CLK_FREQ
 
 endmenu		# Boot images
 
-source "arch/Kconfig"
-
 source "common/Kconfig"
 
 source "dts/Kconfig"
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v4 4/6] kconfig: switch to single .config configuration
  2015-02-20 17:09 [U-Boot] [PATCH v4 0/6] kconfig: turnaround into single .config Masahiro Yamada
                   ` (2 preceding siblings ...)
  2015-02-20 17:09 ` [U-Boot] [PATCH v4 3/6] kconfig: Adjust ordering so that defaults work as expected Masahiro Yamada
@ 2015-02-20 17:09 ` Masahiro Yamada
  2015-02-20 17:10 ` [U-Boot] [PATCH v4 5/6] kconfig: remove unneeded dependency on !SPL_BUILD Masahiro Yamada
  2015-02-20 17:10 ` [U-Boot] [PATCH v4 6/6] malloc_f: enable SYS_MALLOC_F by default if DM is on Masahiro Yamada
  5 siblings, 0 replies; 7+ messages in thread
From: Masahiro Yamada @ 2015-02-20 17:09 UTC (permalink / raw)
  To: u-boot

When Kconfig for U-boot was examined, one of the biggest issues was
how to support multiple images (Normal, SPL, TPL).  There were
actually two options, "single .config" and "multiple .config".
After some discussions and thought experiments, I chose the latter,
i.e. to create ".config", "spl/.config", "tpl/.config" for Normal,
SPL, TPL, respectively.

It is true that the "multiple .config" strategy provided us the
maximum flexibility and helped to avoid duplicating CONFIGs among
Normal, SPL, TPL, but I have noticed some fatal problems:

[1] It is impossible to share CONFIG options across the images.
  If you change the configuration of Main image, you often have to
  adjust some SPL configurations correspondingly.  Currently, we
  cannot handle the dependencies between them.  It means one of the
  biggest advantages of Kconfig is lost.

[2] It is too painful to change both ".config" and "spl/.config".
  Sunxi guys started to work around this problem by creating a new
  configuration target.  Commit cbdd9a9737cc (sunxi: kconfig: Add
  %_felconfig rule to enable FEL build of sunxi platforms.) added
  "make *_felconfig" to enable CONFIG_SPL_FEL on both images.
  Changing the configuration of multiple images in one command is a
  generic demand.  The current implementation cannot propose any
  good solution about this.

[3] Kconfig files are getting ugly and difficult to understand.
  Commit b724bd7d6349 (dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to
  Kconfig) has sprinkled "if !SPL_BUILD" over the Kconfig files.

[4] The build system got more complicated than it should be.
  To adjust Linux-originated Kconfig to U-Boot, the helper script
  "scripts/multiconfig.sh" was introduced.  Writing a complicated
  text processor is a shell script sometimes caused problems.

Now I believe the "single .config" will serve us better.  With it,
all the problems above would go away.  Instead, we will have to add
some CONFIG_SPL_* (and CONFIG_TPL_*) options such as CONFIG_SPL_DM,
but we will not have much.  Anyway, this is what we do now in
scripts/Makefile.spl.

I admit my mistake with my apology and this commit switches to the
single .config configuration.

It is not so difficult to do that:

 - Remove unnecessary processings from scripts/multiconfig.sh
  This file will remain for a while to support the current defconfig
  format.  It will be removed after more cleanups are done.

 - Adjust some makefiles and Kconfigs

 - Add some entries to include/config_uncmd_spl.h and the new file
   scripts/Makefile.uncmd_spl.  Some CONFIG options that are not
   supported on SPL must be disabled because one .config is shared
   between SPL and U-Boot proper going forward.  I know this is not
   a beautiful solution and I think we can do better, but let's see
   how much we will have to describe them.

 - update doc/README.kconfig

More cleaning up patches will follow this.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

Changes in v3: None
Changes in v2:
  - Fix typos in commit description

 Kconfig                                 |  14 --
 arch/arm/cpu/armv7/tegra-common/Kconfig |   2 +-
 arch/arm/cpu/armv7/uniphier/Kconfig     |   1 -
 config.mk                               |   5 +
 configs/ph1_ld4_defconfig               |   2 +-
 configs/ph1_pro4_defconfig              |   2 +-
 configs/ph1_sld8_defconfig              |   2 +-
 doc/README.kconfig                      | 132 ++++------------
 drivers/mtd/nand/Kconfig                |   2 +-
 include/config_uncmd_spl.h              |   9 ++
 scripts/Makefile.autoconf               |  36 +++--
 scripts/Makefile.build                  |   3 +-
 scripts/Makefile.spl                    |  10 +-
 scripts/Makefile.uncmd_spl              |  16 ++
 scripts/multiconfig.sh                  | 261 +-------------------------------
 15 files changed, 108 insertions(+), 389 deletions(-)
 create mode 100644 scripts/Makefile.uncmd_spl

diff --git a/Kconfig b/Kconfig
index 351e5c9..c37817c 100644
--- a/Kconfig
+++ b/Kconfig
@@ -8,10 +8,6 @@ config UBOOTVERSION
 	string
 	option env="UBOOTVERSION"
 
-config KCONFIG_OBJDIR
-	string
-	option env="KCONFIG_OBJDIR"
-
 # Allow defaults in arch-specific code to override any given here
 source "arch/Kconfig"
 
@@ -89,16 +85,6 @@ endmenu		# General setup
 
 menu "Boot images"
 
-config SPL_BUILD
-	bool
-	depends on $KCONFIG_OBJDIR="spl" || $KCONFIG_OBJDIR="tpl"
-	default y
-
-config TPL_BUILD
-	bool
-	depends on $KCONFIG_OBJDIR="tpl"
-	default y
-
 config SUPPORT_SPL
 	bool
 
diff --git a/arch/arm/cpu/armv7/tegra-common/Kconfig b/arch/arm/cpu/armv7/tegra-common/Kconfig
index 8b51558..d1f27bf 100644
--- a/arch/arm/cpu/armv7/tegra-common/Kconfig
+++ b/arch/arm/cpu/armv7/tegra-common/Kconfig
@@ -24,7 +24,7 @@ config SYS_MALLOC_F_LEN
 	default 0x1800 if SYS_MALLOC_F
 
 config USE_PRIVATE_LIBGCC
-	default y if SPL_BUILD
+	default y
 
 config DM
 	default y if !SPL_BUILD
diff --git a/arch/arm/cpu/armv7/uniphier/Kconfig b/arch/arm/cpu/armv7/uniphier/Kconfig
index 371b274..afb3c55 100644
--- a/arch/arm/cpu/armv7/uniphier/Kconfig
+++ b/arch/arm/cpu/armv7/uniphier/Kconfig
@@ -68,7 +68,6 @@ config CMD_DDRPHY_DUMP
 
 choice
 	prompt "DDR3 Frequency select"
-	depends on SPL_BUILD
 
 config DDR_FREQ_1600
 	bool "DDR3 1600"
diff --git a/config.mk b/config.mk
index 64c2951..6282919 100644
--- a/config.mk
+++ b/config.mk
@@ -24,6 +24,11 @@ VENDOR :=
 
 ARCH := $(CONFIG_SYS_ARCH:"%"=%)
 CPU := $(CONFIG_SYS_CPU:"%"=%)
+ifdef CONFIG_SPL_BUILD
+ifdef CONFIG_TEGRA
+CPU := arm720t
+endif
+endif
 BOARD := $(CONFIG_SYS_BOARD:"%"=%)
 ifneq ($(CONFIG_SYS_VENDOR),)
 VENDOR := $(CONFIG_SYS_VENDOR:"%"=%)
diff --git a/configs/ph1_ld4_defconfig b/configs/ph1_ld4_defconfig
index 86b4b15..fa8d291 100644
--- a/configs/ph1_ld4_defconfig
+++ b/configs/ph1_ld4_defconfig
@@ -39,4 +39,4 @@ CONFIG_DM_I2C=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
-S:CONFIG_SPL_NAND_DENALI=y
+CONFIG_SPL_NAND_DENALI=y
diff --git a/configs/ph1_pro4_defconfig b/configs/ph1_pro4_defconfig
index 242bcf9..12f0694 100644
--- a/configs/ph1_pro4_defconfig
+++ b/configs/ph1_pro4_defconfig
@@ -39,4 +39,4 @@ CONFIG_DM_I2C=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
-S:CONFIG_SPL_NAND_DENALI=y
+CONFIG_SPL_NAND_DENALI=y
diff --git a/configs/ph1_sld8_defconfig b/configs/ph1_sld8_defconfig
index 8e95f17..e66d166 100644
--- a/configs/ph1_sld8_defconfig
+++ b/configs/ph1_sld8_defconfig
@@ -39,4 +39,4 @@ CONFIG_DM_I2C=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
-S:CONFIG_SPL_NAND_DENALI=y
+CONFIG_SPL_NAND_DENALI=y
diff --git a/doc/README.kconfig b/doc/README.kconfig
index 69dc459..288d17d 100644
--- a/doc/README.kconfig
+++ b/doc/README.kconfig
@@ -17,109 +17,45 @@ source directory for a basic specification of Kconfig.
 Difference from Linux's Kconfig
 -------------------------------
 
-The biggest difference between Linux Kernel and U-Boot in terms of the
-configuration is that U-Boot has to configure multiple boot images per board:
-Normal, SPL, TPL.
-Kconfig functions need to be expanded for U-Boot to handle multiple images.
-The files scripts/kconfig/* were imported from Linux Kernel and adjusted
-for that purpose.
+Here are some worth-mentioning configuration targets.
 
-See below for how each configuration target works in U-Boot:
+- silentoldconfig
 
-- config, nconfig, menuconfig, xconfig, gconfig
+  This target updates .config, include/generated/autoconf.h and
+  include/configs/* as in Linux.  In U-Boot, it also does the followings
+  for the compatibility with the old configuration system:
 
-  These targets are used to configure Normal and create (or modify) the
-  .config file.  For SPL configuration, the configutation targets are prefixed
-  with "spl/", for example "make spl/config", "make spl/menuconfig", etc.
-  Those targets create or modify the spl/.config file.  Likewise, run
-  "make tpl/config", "make tpl/menuconfig", etc. for TPL.
+   * create a symbolic link "arch/${ARCH}/include/asm/arch" pointing to
+     the SoC/CPU specific header directory
+   * create include/config.h
+   * create include/autoconf.mk
+   * create spl/include/autoconf.mk (SPL and TPL only)
+   * create tpl/include/autoconf.mk (TPL only)
 
-- silentoldconfig
+   If we could completely switch to Kconfig in a long run
+   (i.e. remove all the include/configs/*.h), those additional processings
+   above would be removed.
 
-  This target updates .config, include/generated/autoconf.h and
-  include/configs/*.  In U-Boot, the same thing is done for SPL, TPL,
-  if supported by the target board.  Depending on whether CONFIG_SPL and
-  CONFIG_TPL are defined, "make silentoldconfig" iterates three times at most
-  changing the work directory.
-
-  To sum up, "make silentoldconfig" possibly updates:
-  - .config, include/generated/autoconf.h, include/config/*
-  - spl/.config, spl/include/generated/autoconf.h, spl/include/config/*
-    (in case CONFIG_SPL=y)
-  - tpl/.config, tpl/include/generated/autoconf.h, tpl/include/config/*
-    (in case CONFIG_TPL=y)
-
-- defconfig, <board>_defconfig
-
-  The target "<board>_defconfig" is used to create the .config based on the
-  file configs/<board>_defconfig.  The "defconfig" target is the same
-  except it checks for a file specified with KBUILD_DEFCONFIG environment.
-
-  Note:
-  The defconfig files are placed under the "configs" directory,
-  not "arch/$(ARCH)/configs".  This is because "ARCH" is not necessarily
-  given from the command line for the U-Boot configuration and build.
-
-  The defconfig file format in U-Boot has the special syntax; each line has
-  "<condition>:" prefix to show which image(s) the line is valid for.
-  For example,
-
-  CONFIG_FOO=100
-  S:CONFIG_FOO=200
-  T:CONFIG_FOO=300
-  ST:CONFIG_BAR=y
-  +S:CONFIG_BAZ=y
-  +T:CONFIG_QUX=y
-  +ST:CONFIG_QUUX=y
-
-  Here, the "<condition>:" prefix is one of:
-  None  - the line is valid only for Normal image
-  S:    - the line is valid only for SPL image
-  T:    - the line is valid only for TPL image
-  ST:   - the line is valid for SPL and TPL images
-  +S:   - the line is valid for Normal and SPL images
-  +T:   - the line is valid for Normal and TPL images
-  +ST:  - the line is valid for Normal, SPL and TPL images
-
-  So, if neither CONFIG_SPL nor CONFIG_TPL is defined, the defconfig file
-  has no "<condition>:" part and therefore has the same form as in Linux.
-  From the example defconfig shown above, three separete configuration sets
-  are generated and used for creating .config, spl/.config and tpl/.config.
-
-  - Input for the default configuration of Normal
-     CONFIG_FOO=100
-     CONFIG_BAZ=y
-     CONFIG_QUX=y
-     CONFIG_QUUX=y
-
-  - Input for the default configuration of SPL
-     CONFIG_FOO=200
-     CONFIG_BAR=y
-     CONFIG_BAZ=y
-     CONFIG_QUUX=y
-
-  - Input for the default configuration of TPL
-     CONFIG_FOO=300
-     CONFIG_BAR=y
-     CONFIG_QUX=y
-     CONFIG_QUUX=y
-
-- savedefconfig
-
-  This is the reverse operation of "make defconfig".  If neither CONFIG_SPL
-  nor CONFIG_TPL is defined in the .config file, it works like "savedefconfig"
-  in Linux Kernel: creates the minimal set of config based on the .config
-  and saves it into the "defconfig" file.  If CONFIG_SPL (and CONFIG_TPL) is
-  defined, the common lines among .config, spl/.config (and tpl/.config) are
-  coalesced together with "<condition:>" prefix for each line as shown above.
-  This file can be used as an input of "defconfig" target.
+- defconfig
+
+  In U-Boot, "make defconfig" is a shorthand of "make sandbox_defconfig"
+
+- <board>_defconfig
+
+  Now it works as in Linux.
+  The prefixes such as "+S:" in *_defconfig are deprecated.
+  You can simply remove the prefixes.  Do not add them for new boards.
 
 - <board>_config
 
   This does not exist in Linux's Kconfig.
+  "make <board>_config" works the same as "make <board>_defconfig".
   Prior to Kconfig, in U-Boot, "make <board>_config" was used for the
-  configuration.  It is still supported for backward compatibility and
-  its behavior is the same as "make <board>_defconfig".
+  configuration.  It is still supported for backward compatibility, so
+  we do not need to update the distro recipes.
+
+
+The other configuration targets work as in Linux Kernel.
 
 
 Migration steps to Kconfig
@@ -137,14 +73,10 @@ based configuration as follows:
 
 Configuration files for use in C sources
   - include/generated/autoconf.h     (generated by Kconfig for Normal)
-  - spl/include/generated/autoconf.h (generated by Kconfig for SPL)
-  - tpl/include/generated/autoconf.h (generated by Kconfig for TPL)
   - include/configs/<board>.h        (exists for all boards)
 
 Configuration file for use in makefiles
-  - include/config/auto.conf         (generated by Kconfig for Normal)
-  - spl/include/config/auto.conf     (generated by Kconfig for SPL)
-  - tpl/include/config/auto.conf     (generated by Kconfig for TPL)
+  - include/config/auto.conf         (generated by Kconfig)
   - include/autoconf.mk              (generated by the old config for Normal)
   - spl/include/autoconfig.mk        (generated by the old config for SPL)
   - tpl/include/autoconfig.mk        (generated by the old config for TPL)
@@ -215,8 +147,8 @@ TODO
   CONFIG_SYS_EXTRA_OPTIONS should not be used for new boards.
 
 - In the pre-Kconfig, a single board had multiple entries in the boards.cfg
-  file with differences in the option fields.  The correspoing defconfig files
-  were auto-generated when switching to Kconfig.  Now we have too many
+  file with differences in the option fields.  The corresponding defconfig
+  files were auto-generated when switching to Kconfig.  Now we have too many
   defconfig files compared with the number of the supported boards.  It is
   recommended to have only one defconfig per board and allow users to select
   the config options.
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index c242214..ccd8211 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -36,7 +36,7 @@ config NAND_DENALI_SPARE_AREA_SKIP_BYTES
 
 endif
 
-if SPL_BUILD
+if SPL
 
 config SPL_NAND_DENALI
 	bool "Support Denali NAND controller for SPL"
diff --git a/include/config_uncmd_spl.h b/include/config_uncmd_spl.h
index 9cb7a9a..9f0fe44 100644
--- a/include/config_uncmd_spl.h
+++ b/include/config_uncmd_spl.h
@@ -20,5 +20,14 @@
 #undef CONFIG_CMD_SNTP
 #undef CONFIG_CMD_TFTPPUT
 #undef CONFIG_CMD_TFTPSRV
+#undef CONFIG_OF_CONTROL
+
+#ifndef CONFIG_SPL_DM
+#undef CONFIG_DM_SERIAL
+#undef CONFIG_DM_GPIO
+#undef CONFIG_DM_I2C
+#undef CONFIG_DM_SPI
+#endif
+
 #endif /* CONFIG_SPL_BUILD */
 #endif /* __CONFIG_UNCMD_SPL_H__ */
diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf
index 8e9d71f..fc970fb 100644
--- a/scripts/Makefile.autoconf
+++ b/scripts/Makefile.autoconf
@@ -7,9 +7,17 @@
 # (= When we move all CONFIGs from header files to Kconfig)
 # this makefile can be deleted.
 
-# obj is "include" or "spl/include" or "tpl/include"
-# for non-SPL, SPL, TPL, respectively
-include $(obj)/config/auto.conf
+__all: include/autoconf.mk include/autoconf.mk.dep
+
+ifeq ($(shell grep -q '^CONFIG_SPL=y' include/config/auto.conf 2>/dev/null && echo y),y)
+__all: spl/include/autoconf.mk
+endif
+
+ifeq ($(shell grep -q '^CONFIG_TPL=y' include/config/auto.conf 2>/dev/null && echo y),y)
+__all: tpl/include/autoconf.mk
+endif
+
+include include/config/auto.conf
 
 include scripts/Kbuild.include
 
@@ -22,7 +30,6 @@ CPP		= $(CC) -E
 include config.mk
 
 UBOOTINCLUDE    := \
-		-I$(obj) \
 		-Iinclude \
 		$(if $(KBUILD_SRC), -I$(srctree)/include) \
 		-I$(srctree)/arch/$(ARCH)/include \
@@ -48,10 +55,10 @@ include/autoconf.mk.dep: FORCE
 # same CONFIG macros
 quiet_cmd_autoconf = GEN     $@
       cmd_autoconf = \
-	$(CPP) $(c_flags) -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && {	\
+	$(CPP) $(c_flags) $2 -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && { \
 		sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp |		\
 		while read line; do							\
-			if ! grep -q "$${line%=*}=" $(obj)/config/auto.conf; then	\
+			if ! grep -q "$${line%=*}=" include/config/auto.conf; then	\
 				echo "$$line";						\
 			fi								\
 		done > $@;								\
@@ -60,10 +67,19 @@ quiet_cmd_autoconf = GEN     $@
 		rm $@.tmp; false;							\
 	}
 
-$(obj)/autoconf.mk: FORCE
+include/autoconf.mk: FORCE
 	$(call cmd,autoconf)
 
-include/autoconf.mk include/autoconf.mk.dep: include/config.h
+spl/include/autoconf.mk: FORCE
+	$(Q)mkdir -p $(dir $@)
+	$(call cmd,autoconf,-DCONFIG_SPL_BUILD)
+
+tpl/include/autoconf.mk: FORCE
+	$(Q)mkdir -p $(dir $@)
+	$(call cmd,autoconf,-DCONFIG_SPL_BUILD -DCONFIG_TPL_BUILD)
+
+include/autoconf.mk include/autoconf.mk.dep \
+	spl/include/autoconf.mk tpl/include/autoconf.mk: include/config.h
 
 # include/config.h
 # Prior to Kconfig, it was generated by mkconfig. Now it is created here.
@@ -75,10 +91,10 @@ define filechk_config_h
 	done;								\
 	echo \#define CONFIG_BOARDDIR board/$(if $(VENDOR),$(VENDOR)/)$(BOARD);\
 	echo \#include \<config_defaults.h\>;				\
+	echo \#include \<config_uncmd_spl.h\>;				\
 	echo \#include \<configs/$(CONFIG_SYS_CONFIG_NAME).h\>;		\
 	echo \#include \<asm/config.h\>;				\
-	echo \#include \<config_fallbacks.h\>;				\
-	echo \#include \<config_uncmd_spl.h\>; )
+	echo \#include \<config_fallbacks.h\>;)
 endef
 
 include/config.h: scripts/Makefile.autoconf create_symlink FORCE
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 14cf092..ac0554e 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -41,8 +41,9 @@ subdir-ccflags-y :=
 
 # Read auto.conf if it exists, otherwise ignore
 # Modified for U-Boot
--include $(prefix)/include/config/auto.conf
+-include include/config/auto.conf
 -include $(prefix)/include/autoconf.mk
+include scripts/Makefile.uncmd_spl
 
 include scripts/Kbuild.include
 
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index cc189ad..fcacb7f 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -21,13 +21,15 @@ _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))
 
 include $(srctree)/scripts/Kbuild.include
 
-UBOOTINCLUDE := -I$(obj)/include $(UBOOTINCLUDE)
-
--include $(obj)/include/config/auto.conf
+-include include/config/auto.conf
 -include $(obj)/include/autoconf.mk
 
+KBUILD_CPPFLAGS += -DCONFIG_SPL_BUILD
+ifeq ($(CONFIG_TPL_BUILD),y)
+KBUILD_CPPFLAGS += -DCONFIG_TPL_BUILD
+endif
+
 ifeq ($(CONFIG_TPL_BUILD),y)
-export CONFIG_TPL_BUILD
 SPL_BIN := u-boot-tpl
 else
 SPL_BIN := u-boot-spl
diff --git a/scripts/Makefile.uncmd_spl b/scripts/Makefile.uncmd_spl
new file mode 100644
index 0000000..0bb7d54
--- /dev/null
+++ b/scripts/Makefile.uncmd_spl
@@ -0,0 +1,16 @@
+# Makefile version of include/config_uncmd_spl.h
+#
+# Invent a better way
+
+ifdef CONFIG_SPL_BUILD
+CONFIG_OF_CONTROL=
+
+ifndef CONFIG_SPL_DM
+CONFIG_DM_SERIAL=
+CONFIG_DM_GPIO=
+CONIFG_DM_I2C=
+CONFIG_DM_SPI=
+CONFIG_DM_SPI_FLASH=
+endif
+
+endif
diff --git a/scripts/multiconfig.sh b/scripts/multiconfig.sh
index 366e8fa..cc8a787 100755
--- a/scripts/multiconfig.sh
+++ b/scripts/multiconfig.sh
@@ -2,11 +2,7 @@
 #
 # A wrapper script to adjust Kconfig for U-Boot
 #
-# Instead of touching various parts under the scripts/kconfig/ directory,
-# pushing necessary adjustments into this single script would be better
-# for code maintainance.  All the make targets related to the configuration
-# (make %config) should be invoked via this script.
-# See doc/README.kconfig for further information of Kconfig.
+# This file will be removed after cleaning up defconfig files
 #
 # Copyright (C) 2014, Masahiro Yamada <yamada.m@jp.panasonic.com>
 #
@@ -15,77 +11,23 @@
 
 set -e
 
-# Set "DEBUG" enavironment variable to show debug messages
-debug () {
-	if [ $DEBUG ]; then
-		echo "$@"
-	fi
-}
-
-# Useful shorthands
-build () {
-	debug $progname: $MAKE -f $srctree/scripts/Makefile.build obj="$@"
-	$MAKE -f $srctree/scripts/Makefile.build obj="$@"
-}
-
-autoconf () {
-	debug $progname: $MAKE -f $srctree/scripts/Makefile.autoconf obj="$@"
-	$MAKE -f $srctree/scripts/Makefile.autoconf obj="$@"
-}
-
 # Make a configuration target
 # Usage:
 #   run_make_config <target> <objdir>
 # <target>: Make target such as "config", "menuconfig", "defconfig", etc.
-# <objdir>: Target directory where the make command is run.
-#           Typically "", "spl", "tpl" for Normal, SPL, TPL, respectively.
 run_make_config () {
-	target=$1
-	objdir=$2
-
 	# Linux expects defconfig files in arch/$(SRCARCH)/configs/ directory,
 	# but U-Boot has them in configs/ directory.
 	# Give SRCARCH=.. to fake scripts/kconfig/Makefile.
-	options="SRCARCH=.. KCONFIG_OBJDIR=$objdir"
-	if [ "$objdir" ]; then
-		options="$options KCONFIG_CONFIG=$objdir/$KCONFIG_CONFIG"
-		mkdir -p $objdir
-	fi
-
-	build scripts/kconfig $options $target
-}
-
-# Parse .config file to detect if CONFIG_SPL, CONFIG_TPL is enabled
-# and returns:
-#   ""        if neither CONFIG_SPL nor CONFIG_TPL is defined
-#   "spl"     if CONFIG_SPL is defined but CONFIG_TPL is not
-#   "spl tpl" if both CONFIG_SPL and CONFIG_TPL are defined
-get_enabled_subimages() {
-	if [ ! -r "$KCONFIG_CONFIG" ]; then
-		# This should never happen
-		echo "$progname: $KCONFIG_CONFIG not found" >&2
-		exit 1
-	fi
-
-	# CONFIG_SPL=y -> spl
-	# CONFIG_TPL=y -> tpl
-	sed -n -e 's/^CONFIG_SPL=y$/spl/p' -e 's/^CONFIG_TPL=y$/tpl/p' \
-							 $KCONFIG_CONFIG
+	$MAKE -f $srctree/scripts/Makefile.build obj=scripts/kconfig SRCARCH=.. $1
 }
 
 do_silentoldconfig () {
 	run_make_config silentoldconfig
-	subimages=$(get_enabled_subimages)
-
-	for obj in $subimages
-	do
-		mkdir -p $obj/include/config $obj/include/generated
-		run_make_config silentoldconfig $obj
-	done
 
 	# If the following part fails, include/config/auto.conf should be
 	# deleted so "make silentoldconfig" will be re-run on the next build.
-	autoconf include include/autoconf.mk include/autoconf.mk.dep || {
+	$MAKE -f $srctree/scripts/Makefile.autoconf || {
 		rm -f include/config/auto.conf
 		exit 1
 	}
@@ -95,14 +37,6 @@ do_silentoldconfig () {
 	# than include/config.h.
 	# Otherwise, 'make silentoldconfig' would be invoked twice.
 	touch include/config/auto.conf
-
-	for obj in $subimages
-	do
-		autoconf $obj/include $obj/include/autoconf.mk || {
-			rm -f include/config/auto.conf
-			exit 1
-		}
-	done
 }
 
 cleanup_after_defconfig () {
@@ -116,7 +50,6 @@ cleanup_after_defconfig () {
 #  do_board_defconfig <board>_defconfig
 do_board_defconfig () {
 	defconfig_path=$srctree/configs/$1
-	tmp_defconfig_path=configs/.tmp_defconfig
 
 	if [ ! -r $defconfig_path ]; then
 		echo >&2 "***"
@@ -126,42 +59,17 @@ do_board_defconfig () {
 	fi
 
 	mkdir -p arch configs
-	# defconfig for Normal:
-	#  pick lines without prefixes and lines starting '+' prefix
-	#  and rip the prefixes off.
-	sed -n -e '/^[+A-Z]*:/!p' -e 's/^+[A-Z]*://p' $defconfig_path \
-						> configs/.tmp_defconfig
+	# prefix "*:" is deprecated.  Drop it simply.
+	sed -e 's/^[+A-Z]*://' $defconfig_path > configs/.tmp_defconfig
 
 	run_make_config .tmp_defconfig || {
 		cleanup_after_defconfig
 		exit 1
 	}
 
-	for img in $(get_enabled_subimages)
-	do
-		symbol=$(echo $img | cut -c 1 | tr '[a-z]' '[A-Z]')
-		# defconfig for SPL, TPL:
-		#   pick lines with 'S', 'T' prefix and rip the prefixes off
-		sed -n -e 's/^[+A-Z]*'$symbol'[A-Z]*://p' $defconfig_path \
-						> configs/.tmp_defconfig
-		run_make_config .tmp_defconfig $img || {
-			cleanup_after_defconfig
-			exit 1
-		}
-	done
-
 	cleanup_after_defconfig
 }
 
-do_defconfig () {
-	if [ "$KBUILD_DEFCONFIG" ]; then
-		do_board_defconfig $KBUILD_DEFCONFIG
-		echo "*** Default configuration is based on '$KBUILD_DEFCONFIG'"
-	else
-		run_make_config defconfig
-	fi
-}
-
 do_board_felconfig () {
     do_board_defconfig ${1%%_felconfig}_defconfig
     if ! grep -q CONFIG_ARCH_SUNXI=y .config || ! grep -q CONFIG_SPL=y .config ; then
@@ -169,162 +77,11 @@ do_board_felconfig () {
 	exit 1
     fi
     sed -i -e 's/\# CONFIG_SPL_FEL is not set/CONFIG_SPL_FEL=y\nCONFIG_UART0_PORT_F=n/g' \
-	.config spl/.config
+	.config
 }
 
-do_savedefconfig () {
-	if [ -r "$KCONFIG_CONFIG" ]; then
-		subimages=$(get_enabled_subimages)
-	else
-		subimages=
-	fi
-
-	run_make_config savedefconfig
-
-	output_lines=
-
-	# -r option is necessay because some string-type configs may include
-	# backslashes as an escape character
-	while read -r line
-	do
-		output_lines="$output_lines%$line"
-	done < defconfig
-
-	for img in $subimages
-	do
-		run_make_config savedefconfig $img
-
-		symbol=$(echo $img | cut -c 1 | tr '[a-z]' '[A-Z]')
-		unmatched=
-
-		while read -r line
-		do
-			tmp=
-			match=
-
-			# "# CONFIG_FOO is not set" should not be divided.
-			# Use "%" as a separator, instead of a whitespace.
-			# "%" is unlikely to appear in defconfig context.
-			save_IFS=$IFS
-			IFS=%
-			# coalesce common lines together
-			for i in $output_lines
-			do
-				case "$i" in
-				[+A-Z]*:$line)
-					tmp="$tmp%$unmatched"
-					i=$(echo "$i" | \
-					    sed -e "s/^\([^:]*\)/\1$symbol/")
-					tmp="$tmp%$i"
-					match=1
-					;;
-				$line)
-					tmp="$tmp%$unmatched"
-					tmp="$tmp%+$symbol:$i"
-					match=1
-					;;
-				*)
-					tmp="$tmp%$i"
-					;;
-				esac
-			done
-
-			# Restore the default separator for the outer for loop.
-			IFS=$save_IFS
-
-			if [ "$match" ]; then
-				output_lines="$tmp"
-				unmatched=
-			else
-				unmatched="$unmatched%$symbol:$line"
-			fi
-		done < defconfig
-
-		output_lines="$output_lines%$unmatched"
-	done
-
-	rm -f defconfig
-	touch defconfig
-
-	save_IFS=$IFS
-	IFS=%
-
-	for line in $output_lines
-	do
-		case "$line" in
-		"")
-			# do not output blank lines
-			;;
-		*)
-			echo $line >> defconfig
-			;;
-		esac
-	done
-
-	IFS=$save_IFS
-}
-
-# Some sanity checks before running "make <objdir>/<target>",
-# where <objdir> should be either "spl" or "tpl".
-# Doing "make spl/menuconfig" etc. on a non-SPL board makes no sense.
-# It should be allowed only when ".config" exists and "CONFIG_SPL" is enabled.
-#
-# Usage:
-#   check_enabled_sumbimage <objdir>/<target> <objdir>
-check_enabled_subimage () {
-
-	case $2 in
-	spl|tpl) ;;
-	*)
-		echo >&2 "***"
-		echo >&2 "*** \"make $1\" is not supported."
-		echo >&2 "***"
-		exit 1
-		;;
-	esac
-	test -r "$KCONFIG_CONFIG" && get_enabled_subimages | grep -q $2 || {
-		config=CONFIG_$(echo $2 | tr '[a-z]' '[A-Z]')
-
-		echo >&2 "***"
-		echo >&2 "*** Create \"$KCONFIG_CONFIG\" with \"$config\" enabled"
-		echo >&2 "*** before \"make $1\"."
-		echo >&2 "***"
-		exit 1
-	}
-}
-
-# Usage:
-#   do_others <objdir>/<target>
-# The field "<objdir>/" is typically empy, "spl/", "tpl/" for Normal, SPL, TPL,
-# respectively.
-# The field "<target>" is a configuration target such as "config",
-# "menuconfig", etc.
 do_others () {
-	target=${1##*/}
-
-	if [ "$target" = "$1" ]; then
-		objdir=
-	else
-		objdir=${1%/*}
-		check_enabled_subimage $1 $objdir
-
-		if [ -f "$objdir/$KCONFIG_CONFIG" ]; then
-			timestamp_before=$(stat --printf="%Y" \
-						$objdir/$KCONFIG_CONFIG)
-		fi
-	fi
-
-	run_make_config $target $objdir
-
-	if [ "$timestamp_before" -a -f "$objdir/$KCONFIG_CONFIG" ]; then
-		timestamp_after=$(stat --printf="%Y" $objdir/$KCONFIG_CONFIG)
-
-		if [ "$timestamp_after" -gt "$timestamp_before" ]; then
-			# $objdir/.config has been updated.
-			# touch .config to invoke "make silentoldconfig"
-			touch $KCONFIG_CONFIG
-		fi
-	fi
+	run_make_config $1
 }
 
 progname=$(basename $0)
@@ -340,10 +97,6 @@ case $target in
 	do_board_defconfig ${target%_config}_defconfig;;
 silentoldconfig)
 	do_silentoldconfig;;
-defconfig)
-	do_defconfig;;
-savedefconfig)
-	do_savedefconfig;;
 *)
 	do_others $target;;
 esac
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v4 5/6] kconfig: remove unneeded dependency on !SPL_BUILD
  2015-02-20 17:09 [U-Boot] [PATCH v4 0/6] kconfig: turnaround into single .config Masahiro Yamada
                   ` (3 preceding siblings ...)
  2015-02-20 17:09 ` [U-Boot] [PATCH v4 4/6] kconfig: switch to single .config configuration Masahiro Yamada
@ 2015-02-20 17:10 ` Masahiro Yamada
  2015-02-20 17:10 ` [U-Boot] [PATCH v4 6/6] malloc_f: enable SYS_MALLOC_F by default if DM is on Masahiro Yamada
  5 siblings, 0 replies; 7+ messages in thread
From: Masahiro Yamada @ 2015-02-20 17:10 UTC (permalink / raw)
  To: u-boot

Now CONFIG_SPL_BUILD is not defined in Kconfig, so
"!depends on SPL_BUILD" and "if !SPL_BUILD" are redundant.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

Changes in v3: None
Changes in v2:
  - Fix a typo in commit description

 Kconfig                                 | 12 ++----------
 arch/arm/Kconfig                        |  7 +++----
 arch/arm/cpu/arm1176/bcm2835/Kconfig    |  6 +++---
 arch/arm/cpu/armv7/exynos/Kconfig       | 26 +++++++++++++-------------
 arch/arm/cpu/armv7/omap3/Kconfig        |  8 ++++----
 arch/arm/cpu/armv7/s5pc1xx/Kconfig      |  4 ++--
 arch/arm/cpu/armv7/tegra-common/Kconfig | 12 ++++++------
 arch/arm/cpu/armv7/uniphier/Kconfig     |  1 -
 board/compulab/cm_t335/Kconfig          |  6 +++---
 board/gumstix/pepper/Kconfig            |  6 +++---
 board/isee/igep0033/Kconfig             |  6 +++---
 board/phytec/pcm051/Kconfig             |  6 +++---
 board/samsung/goni/Kconfig              |  6 +++---
 board/samsung/smdkc100/Kconfig          |  6 +++---
 board/silica/pengwyn/Kconfig            |  6 +++---
 board/ti/am335x/Kconfig                 |  8 ++++----
 common/Kconfig                          |  1 -
 drivers/core/Kconfig                    | 16 ++++++----------
 drivers/mtd/nand/Kconfig                |  4 ----
 dts/Kconfig                             |  1 -
 include/config_uncmd_spl.h              |  4 ++++
 scripts/Makefile.uncmd_spl              |  4 +++-
 22 files changed, 71 insertions(+), 85 deletions(-)

diff --git a/Kconfig b/Kconfig
index c37817c..64c095c 100644
--- a/Kconfig
+++ b/Kconfig
@@ -15,7 +15,6 @@ menu "General setup"
 
 config LOCALVERSION
 	string "Local version - append to U-Boot release"
-	depends on !SPL_BUILD
 	help
 	  Append an extra string to the end of your U-Boot version.
 	  This will show up on your boot log, for example.
@@ -26,7 +25,6 @@ config LOCALVERSION
 
 config LOCALVERSION_AUTO
 	bool "Automatically append version information to the version string"
-	depends on !SPL_BUILD
 	default y
 	help
 	  This will try to automatically determine if the current tree is a
@@ -47,7 +45,6 @@ config LOCALVERSION_AUTO
 
 config CC_OPTIMIZE_FOR_SIZE
 	bool "Optimize for size"
-	depends on !SPL_BUILD
 	default y
 	help
 	  Enabling this option will pass "-Os" instead of "-O2" to gcc
@@ -94,23 +91,19 @@ config SUPPORT_TPL
 config SPL
 	bool
 	depends on SUPPORT_SPL
-	prompt "Enable SPL" if !SPL_BUILD
-	default y if SPL_BUILD
+	prompt "Enable SPL"
 	help
 	  If you want to build SPL as well as the normal image, say Y.
 
 config TPL
 	bool
 	depends on SPL && SUPPORT_TPL
-	prompt "Enable TPL" if !SPL_BUILD
-	default y if TPL_BUILD
-	default n
+	prompt "Enable TPL"
 	help
 	  If you want to build TPL as well as the normal image and SPL, say Y.
 
 config FIT
 	bool "Support Flattened Image Tree"
-	depends on !SPL_BUILD
 	help
 	  This option allows to boot the new uImage structrure,
 	  Flattened Image Tree.  FIT is formally a FDT, which can include
@@ -134,7 +127,6 @@ config FIT_SIGNATURE
 
 config SYS_EXTRA_OPTIONS
 	string "Extra Options (DEPRECATED)"
-	depends on !SPL_BUILD
 	help
 	  The old configuration infrastructure (= mkconfig + boards.cfg)
 	  provided the extra options field. If you have something like
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 41f3220..700e2a8 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -739,9 +739,8 @@ config TEGRA
 	bool "NVIDIA Tegra"
 	select SUPPORT_SPL
 	select SPL
-	select OF_CONTROL if !SPL_BUILD
-	select CPU_ARM720T if SPL_BUILD
-	select CPU_V7 if !SPL_BUILD
+	select OF_CONTROL
+	select CPU_V7
 
 config TARGET_VEXPRESS64_AEMV8A
 	bool "Support vexpress_aemv8a"
@@ -833,7 +832,7 @@ config ARCH_UNIPHIER
 	select CPU_V7
 	select SUPPORT_SPL
 	select SPL
-	select OF_CONTROL if !SPL_BUILD
+	select OF_CONTROL
 
 endchoice
 
diff --git a/arch/arm/cpu/arm1176/bcm2835/Kconfig b/arch/arm/cpu/arm1176/bcm2835/Kconfig
index 94f57d7..7d0fc67 100644
--- a/arch/arm/cpu/arm1176/bcm2835/Kconfig
+++ b/arch/arm/cpu/arm1176/bcm2835/Kconfig
@@ -1,12 +1,12 @@
 if TARGET_RPI
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_SERIAL
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if !SPL_BUILD
+	default y
 
 endif
diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig
index 23869ce..9e47ed3 100644
--- a/arch/arm/cpu/armv7/exynos/Kconfig
+++ b/arch/arm/cpu/armv7/exynos/Kconfig
@@ -6,7 +6,7 @@ choice
 config TARGET_SMDKV310
 	select SUPPORT_SPL
 	bool "Exynos4210 SMDKV310 board"
-	select OF_CONTROL if !SPL_BUILD
+	select OF_CONTROL
 
 config TARGET_TRATS
 	bool "Exynos4210 Trats board"
@@ -33,32 +33,32 @@ config TARGET_ARNDALE
 	select CPU_V7_HAS_NONSEC
 	select CPU_V7_HAS_VIRT
 	select SUPPORT_SPL
-	select OF_CONTROL if !SPL_BUILD
+	select OF_CONTROL
 
 config TARGET_SMDK5250
 	bool "SMDK5250 board"
 	select SUPPORT_SPL
-	select OF_CONTROL if !SPL_BUILD
+	select OF_CONTROL
 
 config TARGET_SNOW
 	bool "Snow board"
 	select SUPPORT_SPL
-	select OF_CONTROL if !SPL_BUILD
+	select OF_CONTROL
 
 config TARGET_SMDK5420
 	bool "SMDK5420 board"
 	select SUPPORT_SPL
-	select OF_CONTROL if !SPL_BUILD
+	select OF_CONTROL
 
 config TARGET_PEACH_PI
 	bool "Peach Pi board"
 	select SUPPORT_SPL
-	select OF_CONTROL if !SPL_BUILD
+	select OF_CONTROL
 
 config TARGET_PEACH_PIT
 	bool "Peach Pit board"
 	select SUPPORT_SPL
-	select OF_CONTROL if !SPL_BUILD
+	select OF_CONTROL
 
 endchoice
 
@@ -66,22 +66,22 @@ config SYS_SOC
 	default "exynos"
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_SERIAL
-	default y if !SPL_BUILD
+	default y
 
 config DM_SPI
-	default y if !SPL_BUILD
+	default y
 
 config DM_SPI_FLASH
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if !SPL_BUILD
+	default y
 
 config SYS_MALLOC_F
-	default y if !SPL_BUILD
+	default y
 
 source "board/samsung/smdkv310/Kconfig"
 source "board/samsung/trats/Kconfig"
diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig
index 2e193ab..b3d5ef3 100644
--- a/arch/arm/cpu/armv7/omap3/Kconfig
+++ b/arch/arm/cpu/armv7/omap3/Kconfig
@@ -94,16 +94,16 @@ config TARGET_TWISTER
 endchoice
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if DM && !SPL_BUILD
+	default y if DM
 
 config DM_SERIAL
-	default y if DM && !SPL_BUILD
+	default y if DM
 
 config SYS_MALLOC_F
-	default y if DM && !SPL_BUILD
+	default y if DM
 
 config SYS_SOC
 	default "omap3"
diff --git a/arch/arm/cpu/armv7/s5pc1xx/Kconfig b/arch/arm/cpu/armv7/s5pc1xx/Kconfig
index 6288134..bc73813 100644
--- a/arch/arm/cpu/armv7/s5pc1xx/Kconfig
+++ b/arch/arm/cpu/armv7/s5pc1xx/Kconfig
@@ -5,11 +5,11 @@ choice
 
 config TARGET_S5P_GONI
 	bool "S5P Goni board"
-	select OF_CONTROL if !SPL_BUILD
+	select OF_CONTROL
 
 config TARGET_SMDKC100
 	bool "Support smdkc100 board"
-	select OF_CONTROL if !SPL_BUILD
+	select OF_CONTROL
 
 endchoice
 
diff --git a/arch/arm/cpu/armv7/tegra-common/Kconfig b/arch/arm/cpu/armv7/tegra-common/Kconfig
index d1f27bf..8b3bcbd 100644
--- a/arch/arm/cpu/armv7/tegra-common/Kconfig
+++ b/arch/arm/cpu/armv7/tegra-common/Kconfig
@@ -27,22 +27,22 @@ config USE_PRIVATE_LIBGCC
 	default y
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_SERIAL
-	default y if !SPL_BUILD
+	default y
 
 config DM_SPI
-	default y if !SPL_BUILD
+	default y
 
 config DM_SPI_FLASH
-	default y if !SPL_BUILD
+	default y
 
 config DM_I2C
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if !SPL_BUILD
+	default y
 
 source "arch/arm/cpu/armv7/tegra20/Kconfig"
 source "arch/arm/cpu/armv7/tegra30/Kconfig"
diff --git a/arch/arm/cpu/armv7/uniphier/Kconfig b/arch/arm/cpu/armv7/uniphier/Kconfig
index afb3c55..b6dc75f 100644
--- a/arch/arm/cpu/armv7/uniphier/Kconfig
+++ b/arch/arm/cpu/armv7/uniphier/Kconfig
@@ -61,7 +61,6 @@ config CMD_PINMON
 
 config CMD_DDRPHY_DUMP
 	bool "Enable dump command of DDR PHY parameters"
-	depends on !SPL_BUILD
 	help
 	  The command "ddrphy" shows the resulting parameters of DDR PHY
 	  training; it is useful for the evaluation of DDR PHY training.
diff --git a/board/compulab/cm_t335/Kconfig b/board/compulab/cm_t335/Kconfig
index aadbfbc..3a8f304 100644
--- a/board/compulab/cm_t335/Kconfig
+++ b/board/compulab/cm_t335/Kconfig
@@ -13,12 +13,12 @@ config SYS_CONFIG_NAME
 	default "cm_t335"
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if !SPL_BUILD
+	default y
 
 config DM_SERIAL
-	default y if !SPL_BUILD
+	default y
 
 endif
diff --git a/board/gumstix/pepper/Kconfig b/board/gumstix/pepper/Kconfig
index 3099a9e..750db85 100644
--- a/board/gumstix/pepper/Kconfig
+++ b/board/gumstix/pepper/Kconfig
@@ -13,12 +13,12 @@ config SYS_CONFIG_NAME
 	default "pepper"
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if !SPL_BUILD
+	default y
 
 config DM_SERIAL
-	default y if !SPL_BUILD
+	default y
 
 endif
diff --git a/board/isee/igep0033/Kconfig b/board/isee/igep0033/Kconfig
index 2fe2ef1..9a8421e 100644
--- a/board/isee/igep0033/Kconfig
+++ b/board/isee/igep0033/Kconfig
@@ -13,12 +13,12 @@ config SYS_CONFIG_NAME
 	default "am335x_igep0033"
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if !SPL_BUILD
+	default y
 
 config DM_SERIAL
-	default y if !SPL_BUILD
+	default y
 
 endif
diff --git a/board/phytec/pcm051/Kconfig b/board/phytec/pcm051/Kconfig
index 65094cf..bb98715 100644
--- a/board/phytec/pcm051/Kconfig
+++ b/board/phytec/pcm051/Kconfig
@@ -13,12 +13,12 @@ config SYS_CONFIG_NAME
 	default "pcm051"
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if !SPL_BUILD
+	default y
 
 config DM_SERIAL
-	default y if !SPL_BUILD
+	default y
 
 endif
diff --git a/board/samsung/goni/Kconfig b/board/samsung/goni/Kconfig
index 2c5d3fc..006e864 100644
--- a/board/samsung/goni/Kconfig
+++ b/board/samsung/goni/Kconfig
@@ -13,12 +13,12 @@ config SYS_CONFIG_NAME
 	default "s5p_goni"
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if !SPL_BUILD
+	default y
 
 config DM_SERIAL
-	default y if !SPL_BUILD
+	default y
 
 endif
diff --git a/board/samsung/smdkc100/Kconfig b/board/samsung/smdkc100/Kconfig
index 996fe3c..ea87166 100644
--- a/board/samsung/smdkc100/Kconfig
+++ b/board/samsung/smdkc100/Kconfig
@@ -13,12 +13,12 @@ config SYS_CONFIG_NAME
 	default "smdkc100"
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if !SPL_BUILD
+	default y
 
 config DM_SERIAL
-	default y if !SPL_BUILD
+	default y
 
 endif
diff --git a/board/silica/pengwyn/Kconfig b/board/silica/pengwyn/Kconfig
index 6ecda80..2e9a2b3 100644
--- a/board/silica/pengwyn/Kconfig
+++ b/board/silica/pengwyn/Kconfig
@@ -13,12 +13,12 @@ config SYS_CONFIG_NAME
 	default "pengwyn"
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if !SPL_BUILD
+	default y
 
 config DM_SERIAL
-	default y if !SPL_BUILD
+	default y
 
 endif
diff --git a/board/ti/am335x/Kconfig b/board/ti/am335x/Kconfig
index cad10c2..8c45892 100644
--- a/board/ti/am335x/Kconfig
+++ b/board/ti/am335x/Kconfig
@@ -39,15 +39,15 @@ config NOR_BOOT
 	  NOR for environment.
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if DM && !SPL_BUILD
+	default y if DM
 
 config DM_SERIAL
-	default y if DM && !SPL_BUILD
+	default y if DM
 
 config SYS_MALLOC_F
-	default y if DM && !SPL_BUILD
+	default y if DM
 
 endif
diff --git a/common/Kconfig b/common/Kconfig
index 2ca002d..f82bc88 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1,5 +1,4 @@
 menu "Command line interface"
-	depends on !SPL_BUILD
 
 config HUSH_PARSER
 	bool "Use hush shell"
diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
index f0d6110..75d182d 100644
--- a/drivers/core/Kconfig
+++ b/drivers/core/Kconfig
@@ -1,6 +1,5 @@
 config DM
 	bool "Enable Driver Model"
-	depends on !SPL_BUILD
 	help
 	  This config option enables Driver Model. This brings in the core
 	  support, including scanning of platform data on start-up. If
@@ -22,31 +21,28 @@ config SPL_DM
 
 config DM_WARN
 	bool "Enable warnings in driver model"
+	depends on DM
+	default y
 	help
 	  The dm_warn() function can use up quite a bit of space for its
 	  strings. By default this is disabled for SPL builds to save space.
 	  This will cause dm_warn() to be compiled out - it will do nothing
 	  when called.
-	depends on DM
-	default y if !SPL_BUILD
-	default n if SPL_BUILD
 
 config DM_DEVICE_REMOVE
 	bool "Support device removal"
+	depends on DM
+	default y
 	help
 	  We can save some code space by dropping support for removing a
 	  device. This is not normally required in SPL, so by default this
 	  option is disabled for SPL.
-	depends on DM
-	default y if !SPL_BUILD
-	default n if SPL_BUILD
 
 config DM_STDIO
 	bool "Support stdio registration"
+	depends on DM
+	default y
 	help
 	  Normally serial drivers register with stdio so that they can be used
 	  as normal output devices. In SPL we don't normally use stdio, so
 	  we can omit this feature.
-	depends on DM
-	default y if !SPL_BUILD
-	default n if SPL_BUILD
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index ccd8211..72825c3 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -6,8 +6,6 @@ config SYS_NAND_SELF_INIT
 	  This option, if enabled, provides more flexible and linux-like
 	  NAND initialization process.
 
-if !SPL_BUILD
-
 config NAND_DENALI
 	bool "Support Denali NAND controller"
 	select SYS_NAND_SELF_INIT
@@ -34,8 +32,6 @@ config NAND_DENALI_SPARE_AREA_SKIP_BYTES
 	  of OOB area before last ECC sector data starts.  This is potentially
 	  used to preserve the bad block marker in the OOB area.
 
-endif
-
 if SPL
 
 config SPL_NAND_DENALI
diff --git a/dts/Kconfig b/dts/Kconfig
index 5fe63f8..ca5bd6f 100644
--- a/dts/Kconfig
+++ b/dts/Kconfig
@@ -9,7 +9,6 @@ config SUPPORT_OF_CONTROL
 	bool
 
 menu "Device Tree Control"
-	depends on !SPL_BUILD
 	depends on SUPPORT_OF_CONTROL
 
 config OF_CONTROL
diff --git a/include/config_uncmd_spl.h b/include/config_uncmd_spl.h
index 9f0fe44..a9106f4 100644
--- a/include/config_uncmd_spl.h
+++ b/include/config_uncmd_spl.h
@@ -29,5 +29,9 @@
 #undef CONFIG_DM_SPI
 #endif
 
+#undef CONFIG_DM_WARN
+#undef CONFIG_DM_DEVICE_REMOVE
+#undef CONFIG_DM_STDIO
+
 #endif /* CONFIG_SPL_BUILD */
 #endif /* __CONFIG_UNCMD_SPL_H__ */
diff --git a/scripts/Makefile.uncmd_spl b/scripts/Makefile.uncmd_spl
index 0bb7d54..343c3fc 100644
--- a/scripts/Makefile.uncmd_spl
+++ b/scripts/Makefile.uncmd_spl
@@ -1,6 +1,6 @@
 # Makefile version of include/config_uncmd_spl.h
 #
-# Invent a better way
+# TODO: Invent a better way
 
 ifdef CONFIG_SPL_BUILD
 CONFIG_OF_CONTROL=
@@ -13,4 +13,6 @@ CONFIG_DM_SPI=
 CONFIG_DM_SPI_FLASH=
 endif
 
+CONFIG_DM_DEVICE_REMOVE=
+
 endif
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v4 6/6] malloc_f: enable SYS_MALLOC_F by default if DM is on
  2015-02-20 17:09 [U-Boot] [PATCH v4 0/6] kconfig: turnaround into single .config Masahiro Yamada
                   ` (4 preceding siblings ...)
  2015-02-20 17:10 ` [U-Boot] [PATCH v4 5/6] kconfig: remove unneeded dependency on !SPL_BUILD Masahiro Yamada
@ 2015-02-20 17:10 ` Masahiro Yamada
  5 siblings, 0 replies; 7+ messages in thread
From: Masahiro Yamada @ 2015-02-20 17:10 UTC (permalink / raw)
  To: u-boot

To use Derive Model before relocation, CONFIG_SYS_MALLOC_F
must be enabled.  This should probably be a common requirement
for all the boards with Driver Model implementation.
Let's handle it globally rather than per-SoC or per-board.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

Changes in v3:
  - Newly added

Changes in v2: None

 Kconfig                                 | 1 +
 arch/arm/cpu/armv7/exynos/Kconfig       | 3 ---
 arch/arm/cpu/armv7/omap3/Kconfig        | 3 ---
 arch/arm/cpu/armv7/tegra-common/Kconfig | 3 ---
 arch/arm/cpu/armv7/uniphier/Kconfig     | 3 ---
 arch/x86/Kconfig                        | 3 ---
 board/amcc/canyonlands/Kconfig          | 4 ----
 board/ti/am335x/Kconfig                 | 3 ---
 8 files changed, 1 insertion(+), 22 deletions(-)

diff --git a/Kconfig b/Kconfig
index 64c095c..ac3e001 100644
--- a/Kconfig
+++ b/Kconfig
@@ -54,6 +54,7 @@ config CC_OPTIMIZE_FOR_SIZE
 
 config SYS_MALLOC_F
 	bool "Enable malloc() pool before relocation"
+	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
diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig
index 9e47ed3..bd7540a 100644
--- a/arch/arm/cpu/armv7/exynos/Kconfig
+++ b/arch/arm/cpu/armv7/exynos/Kconfig
@@ -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"
diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig
index b3d5ef3..a38d471 100644
--- a/arch/arm/cpu/armv7/omap3/Kconfig
+++ b/arch/arm/cpu/armv7/omap3/Kconfig
@@ -102,9 +102,6 @@ config DM_GPIO
 config DM_SERIAL
 	default y if DM
 
-config SYS_MALLOC_F
-	default y if DM
-
 config SYS_SOC
 	default "omap3"
 
diff --git a/arch/arm/cpu/armv7/tegra-common/Kconfig b/arch/arm/cpu/armv7/tegra-common/Kconfig
index 8b3bcbd..ddb6435 100644
--- a/arch/arm/cpu/armv7/tegra-common/Kconfig
+++ b/arch/arm/cpu/armv7/tegra-common/Kconfig
@@ -17,9 +17,6 @@ config TEGRA124
 
 endchoice
 
-config SYS_MALLOC_F
-	default y
-
 config SYS_MALLOC_F_LEN
 	default 0x1800 if SYS_MALLOC_F
 
diff --git a/arch/arm/cpu/armv7/uniphier/Kconfig b/arch/arm/cpu/armv7/uniphier/Kconfig
index b6dc75f..20e20a5 100644
--- a/arch/arm/cpu/armv7/uniphier/Kconfig
+++ b/arch/arm/cpu/armv7/uniphier/Kconfig
@@ -48,9 +48,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
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 65909e7..be7fc09 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -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 if SYS_MALLOC_F
 
diff --git a/board/amcc/canyonlands/Kconfig b/board/amcc/canyonlands/Kconfig
index c0dbd18..46efa7a 100644
--- a/board/amcc/canyonlands/Kconfig
+++ b/board/amcc/canyonlands/Kconfig
@@ -39,8 +39,4 @@ config DM
 config DM_SERIAL
 	default y
 
-config SYS_MALLOC_F
-	bool
-	default y
-
 endif
diff --git a/board/ti/am335x/Kconfig b/board/ti/am335x/Kconfig
index 8c45892..7cb006f 100644
--- a/board/ti/am335x/Kconfig
+++ b/board/ti/am335x/Kconfig
@@ -47,7 +47,4 @@ config DM_GPIO
 config DM_SERIAL
 	default y if DM
 
-config SYS_MALLOC_F
-	default y if DM
-
 endif
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-02-20 17:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-20 17:09 [U-Boot] [PATCH v4 0/6] kconfig: turnaround into single .config Masahiro Yamada
2015-02-20 17:09 ` [U-Boot] [PATCH v4 1/6] ARM: UniPhier: set CONFIG_SYS_MALLOC_F to the global default value Masahiro Yamada
2015-02-20 17:09 ` [U-Boot] [PATCH v4 2/6] malloc_f: fix broken .config caused by CONFIG_SYS_MALLOC_F Masahiro Yamada
2015-02-20 17:09 ` [U-Boot] [PATCH v4 3/6] kconfig: Adjust ordering so that defaults work as expected Masahiro Yamada
2015-02-20 17:09 ` [U-Boot] [PATCH v4 4/6] kconfig: switch to single .config configuration Masahiro Yamada
2015-02-20 17:10 ` [U-Boot] [PATCH v4 5/6] kconfig: remove unneeded dependency on !SPL_BUILD Masahiro Yamada
2015-02-20 17:10 ` [U-Boot] [PATCH v4 6/6] malloc_f: enable SYS_MALLOC_F by default if DM is on Masahiro Yamada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.