From 58d423b88e5bc1b6e43aa04a05feccd0e737c061 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 31 Mar 2015 12:47:53 +0900 Subject: 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 --- arch/arm/cpu/armv7/exynos/Kconfig | 15 --------------- arch/arm/cpu/armv7/omap3/Kconfig | 27 ++++++++++++++++++--------- 2 files changed, 18 insertions(+), 24 deletions(-) (limited to 'arch/arm/cpu') diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index 338a745276..f6084ac476 100644 --- a/arch/arm/cpu/armv7/exynos/Kconfig +++ b/arch/arm/cpu/armv7/exynos/Kconfig @@ -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 diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig index 1f96498fb8..cc82c5000e 100644 --- a/arch/arm/cpu/armv7/omap3/Kconfig +++ b/arch/arm/cpu/armv7/omap3/Kconfig @@ -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" -- cgit