diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2015-03-31 12:47:53 +0900 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-04-18 11:11:30 -0600 |
commit | 58d423b88e5bc1b6e43aa04a05feccd0e737c061 (patch) | |
tree | 73da7d15fbaadbb8248fe6b43abb11a08ea51463 /arch/Kconfig | |
parent | b3d023b4058acc83d211555e62068f84e322bcac (diff) | |
download | u-boot-58d423b88e5bc1b6e43aa04a05feccd0e737c061.tar.gz u-boot-58d423b88e5bc1b6e43aa04a05feccd0e737c061.tar.bz2 u-boot-58d423b88e5bc1b6e43aa04a05feccd0e737c061.zip |
dm: select CONFIG_DM* options
As mentioned in the previous commit, adding default values in each
Kconfig causes problems because it does not co-exist with the
"depends on" syntax. (Please note this is not a bug of Kconfig.)
We should not do so unless we have a special reason. Actually,
for CONFIG_DM*, we have no good reason to do so.
Generally, CONFIG_DM is not a user-configurable option. Once we
convert a driver into Driver Model, the board only works with Driver
Model, i.e. CONFIG_DM must be always enabled for that board.
So, using "select DM" is more suitable rather than allowing users to
modify it. Another good thing is, Kconfig warns unmet dependencies
for "select" syntax, so we easily notice bugs.
Actually, CONFIG_DM and other related options have been added
without consistency: some into arch/*/Kconfig, some into
board/*/Kconfig, and some into configs/*_defconfig.
This commit prefers "select" and cleans up the following issues.
[1] Never use "CONFIG_DM=n" in defconfig files
It is really rare to add "CONFIG_FOO=n" to disable CONFIG options.
It is more common to use "# CONFIG_FOO is not set". But here, we
do not even have to do it.
Less than half of OMAP3 boards have been converted to Driver Model.
Adding the default values to arch/arm/cpu/armv7/omap3/Kconfig is
weird. Instead, add "select DM" only to appropriate boards, which
eventually eliminates "CONFIG_DM=n", etc.
[2] Delete redundant CONFIGs
Sandbox sets CONFIG_DM in arch/sandbox/Kconfig and defines it again
in configs/sandbox_defconfig.
Likewise, OMAP3 sets CONFIG_DM arch/arm/cpu/armv7/omap3/Kconfig and
defines it also in omap3_beagle_defconfig and devkit8000_defconfig.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'arch/Kconfig')
-rw-r--r-- | arch/Kconfig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index 2ca530525e..1102346220 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -70,6 +70,12 @@ config SANDBOX select HAVE_GENERIC_BOARD select SYS_GENERIC_BOARD select SUPPORT_OF_CONTROL + select DM + select DM_SPI_FLASH + select DM_SERIAL + select DM_I2C + select DM_SPI + select DM_GPIO config SH bool "SuperH architecture" @@ -84,6 +90,9 @@ config X86 select HAVE_GENERIC_BOARD select SYS_GENERIC_BOARD select SUPPORT_OF_CONTROL + select DM + select DM_SERIAL + select DM_GPIO endchoice |