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>
This commit is contained in:
Masahiro Yamada 2015-03-31 12:47:53 +09:00 committed by Simon Glass
parent b3d023b405
commit 58d423b88e
43 changed files with 64 additions and 230 deletions

View file

@ -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

View file

@ -293,6 +293,9 @@ config TARGET_MX35PDK
config ARCH_BCM283X
bool "Broadcom BCM283X family"
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_INTEGRATORAP_CM946ES
bool "Support integratorap_cm946es"
@ -330,21 +333,33 @@ config TARGET_CM_T335
bool "Support cm_t335"
select CPU_V7
select SUPPORT_SPL
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_PEPPER
bool "Support pepper"
select CPU_V7
select SUPPORT_SPL
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_AM335X_IGEP0033
bool "Support am335x_igep0033"
select CPU_V7
select SUPPORT_SPL
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_PCM051
bool "Support pcm051"
select CPU_V7
select SUPPORT_SPL
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_DRACO
bool "Support draco"
@ -370,11 +385,17 @@ config TARGET_PENGWYN
bool "Support pengwyn"
select CPU_V7
select SUPPORT_SPL
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_AM335X_EVM
bool "Support am335x_evm"
select CPU_V7
select SUPPORT_SPL
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_AM43XX_EVM
bool "Support am43xx_evm"
@ -419,10 +440,18 @@ config TARGET_BCMNSP
config ARCH_EXYNOS
bool "Samsung EXYNOS"
select CPU_V7
select DM
select DM_SPI_FLASH
select DM_SERIAL
select DM_SPI
select DM_GPIO
config ARCH_S5PC1XX
bool "Samsung S5PC1XX"
select CPU_V7
select DM
select DM_SERIAL
select DM_GPIO
config ARCH_HIGHBANK
bool "Calxeda Highbank"
@ -632,6 +661,12 @@ config TEGRA
select SPL
select OF_CONTROL
select CPU_V7
select DM
select DM_SPI_FLASH
select DM_SERIAL
select DM_I2C
select DM_SPI
select DM_GPIO
config TARGET_VEXPRESS64_AEMV8A
bool "Support vexpress_aemv8a"

View file

@ -65,21 +65,6 @@ endchoice
config SYS_SOC
default "exynos"
config DM
default y
config DM_SERIAL
default y
config DM_SPI
default y
config DM_SPI_FLASH
default y
config DM_GPIO
default y
config DM_USB
default y

View file

@ -17,6 +17,9 @@ config TARGET_OMAP3_SDP3430
config TARGET_OMAP3_BEAGLE
bool "TI OMAP3 BeagleBoard"
select SUPPORT_SPL
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_CM_T35
bool "CompuLab CM-T3530 and CM-T3730 boards"
@ -28,6 +31,9 @@ config TARGET_CM_T3517
config TARGET_DEVKIT8000
bool "TimLL OMAP3 Devkit8000"
select SUPPORT_SPL
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_OMAP3_EVM
bool "TI OMAP3 EVM"
@ -44,13 +50,22 @@ config TARGET_OMAP3_EVM_QUICK_NAND
config TARGET_OMAP3_IGEP00X0
bool "IGEP"
select SUPPORT_SPL
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_OMAP3_OVERO
bool "OMAP35xx Gumstix Overo"
select SUPPORT_SPL
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_OMAP3_ZOOM1
bool "TI Zoom1"
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_AM3517_CRANE
bool "am3517_crane"
@ -94,18 +109,12 @@ config TARGET_TWISTER
config TARGET_OMAP3_CAIRO
bool "QUIPOS CAIRO"
select SUPPORT_SPL
select DM
select DM_SERIAL
select DM_GPIO
endchoice
config DM
default y
config DM_GPIO
default y if DM
config DM_SERIAL
default y if DM
config SYS_SOC
default "omap3"

View file

@ -14,15 +14,6 @@ config TARGET_RPI_2
endchoice
config DM
default y
config DM_SERIAL
default y
config DM_GPIO
default y
config PHYS_TO_BUS
default y

View file

@ -23,27 +23,9 @@ config SYS_MALLOC_F_LEN
config USE_PRIVATE_LIBGCC
default y
config DM
default y
config SPL_DM
default y
config DM_SERIAL
default y
config DM_SPI
default y
config DM_SPI_FLASH
default y
config DM_I2C
default y
config DM_GPIO
default y
source "arch/arm/mach-tegra/tegra20/Kconfig"
source "arch/arm/mach-tegra/tegra30/Kconfig"
source "arch/arm/mach-tegra/tegra114/Kconfig"

View file

@ -43,6 +43,8 @@ config TARGET_BUBINGA
config TARGET_CANYONLANDS
bool "Support canyonlands"
select DM
select DM_SERIAL
config TARGET_EBONY
bool "Support ebony"

View file

@ -10,24 +10,6 @@ config SYS_BOARD
config SYS_CONFIG_NAME
default "sandbox"
config DM
default y
config DM_GPIO
default y
config DM_SERIAL
default y
config DM_SPI
default y
config DM_SPI_FLASH
default y
config DM_I2C
default y
config DM_TEST
default y

View file

@ -81,18 +81,6 @@ config TARGET_GALILEO
endchoice
config DM
default y
config DM_GPIO
default y
config DM_SERIAL
default y
config DM_SERIAL
default y
config DM_SPI
default y

View file

@ -33,10 +33,4 @@ config DISPLAY_BOARDINFO
bool
default y
config DM
default y
config DM_SERIAL
default y
endif

View file

@ -12,13 +12,4 @@ config SYS_SOC
config SYS_CONFIG_NAME
default "cm_t335"
config DM
default y
config DM_GPIO
default y
config DM_SERIAL
default y
endif

View file

@ -12,13 +12,4 @@ config SYS_SOC
config SYS_CONFIG_NAME
default "pepper"
config DM
default y
config DM_GPIO
default y
config DM_SERIAL
default y
endif

View file

@ -12,13 +12,4 @@ config SYS_SOC
config SYS_CONFIG_NAME
default "am335x_igep0033"
config DM
default y
config DM_GPIO
default y
config DM_SERIAL
default y
endif

View file

@ -12,13 +12,4 @@ config SYS_SOC
config SYS_CONFIG_NAME
default "pcm051"
config DM
default y
config DM_GPIO
default y
config DM_SERIAL
default y
endif

View file

@ -12,13 +12,4 @@ config SYS_SOC
config SYS_CONFIG_NAME
default "s5p_goni"
config DM
default y
config DM_GPIO
default y
config DM_SERIAL
default y
endif

View file

@ -12,13 +12,4 @@ config SYS_SOC
config SYS_CONFIG_NAME
default "smdkc100"
config DM
default y
config DM_GPIO
default y
config DM_SERIAL
default y
endif

View file

@ -12,13 +12,4 @@ config SYS_SOC
config SYS_CONFIG_NAME
default "pengwyn"
config DM
default y
config DM_GPIO
default y
config DM_SERIAL
default y
endif

View file

@ -38,13 +38,4 @@ config NOR_BOOT
as the ROM only partially sets up pinmux. We also default to using
NOR for environment.
config DM
default y
config DM_GPIO
default y if DM
config DM_SERIAL
default y if DM
endif

View file

@ -9,4 +9,3 @@ CONFIG_DEFAULT_DEVICE_TREE="am335x-boneblack"
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_FIT_SIGNATURE=y
CONFIG_DM=y

View file

@ -2,6 +2,3 @@ CONFIG_SPL=y
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_AM3517_CRANE=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n

View file

@ -2,6 +2,3 @@ CONFIG_SPL=y
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_AM3517_EVM=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n

View file

@ -2,6 +2,3 @@ CONFIG_SPL=n
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_CM_T3517=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n

View file

@ -2,6 +2,3 @@ CONFIG_SPL=y
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_CM_T35=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n

View file

@ -2,6 +2,3 @@ CONFIG_SPL=y
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_DEVKIT8000=y
CONFIG_DM=y
CONFIG_DM_SERIAL=y
CONFIG_DM_GPIO=y

View file

@ -1,6 +1,3 @@
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_DIG297=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n

View file

@ -2,6 +2,3 @@ CONFIG_SPL=y
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_ECO5PK=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n

View file

@ -2,6 +2,3 @@ CONFIG_SPL=y
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_MCX=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n

View file

@ -2,6 +2,3 @@ CONFIG_SPL=y
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_MT_VENTOUX=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n

View file

@ -1,6 +1,3 @@
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_NOKIA_RX51=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n

View file

@ -3,6 +3,3 @@ CONFIG_SYS_EXTRA_OPTIONS="NAND"
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_OMAP3_BEAGLE=y
CONFIG_DM=y
CONFIG_DM_GPIO=y
CONFIG_DM_SERIAL=y

View file

@ -2,6 +2,3 @@ CONFIG_SPL=y
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_OMAP3_EVM=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n

View file

@ -2,6 +2,3 @@ CONFIG_SPL=y
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_OMAP3_EVM_QUICK_MMC=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n

View file

@ -2,6 +2,3 @@ CONFIG_SPL=y
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_OMAP3_EVM_QUICK_NAND=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n

View file

@ -3,6 +3,3 @@ CONFIG_SYS_EXTRA_OPTIONS="SYS_BOARD_OMAP3_HA"
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_TAO3530=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n

View file

@ -1,6 +1,3 @@
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_OMAP3_LOGIC=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n

View file

@ -1,6 +1,3 @@
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_OMAP3_MVBLX=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n

View file

@ -1,6 +1,3 @@
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_OMAP3_PANDORA=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n

View file

@ -1,6 +1,3 @@
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_OMAP3_SDP3430=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n

View file

@ -3,7 +3,6 @@ CONFIG_OF_HOSTFILE=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_FIT_SIGNATURE=y
CONFIG_DM=y
CONFIG_DEFAULT_DEVICE_TREE="sandbox"
CONFIG_CROS_EC=y
CONFIG_CROS_EC_SANDBOX=y

View file

@ -2,6 +2,3 @@ CONFIG_SPL=y
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_TAO3530=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n

View file

@ -2,6 +2,3 @@ CONFIG_SPL=y
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_TRICORDER=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n

View file

@ -3,6 +3,3 @@ CONFIG_SYS_EXTRA_OPTIONS="FLASHCARD"
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_TRICORDER=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n

View file

@ -2,6 +2,3 @@ CONFIG_SPL=y
CONFIG_ARM=y
CONFIG_OMAP34XX=y
CONFIG_TARGET_TWISTER=y
CONFIG_DM=n
CONFIG_DM_SERIAL=n
CONFIG_DM_GPIO=n