From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Tue, 19 Apr 2016 14:58:56 -0600 Subject: [U-Boot] [PATCH 16/60] ARM: tegra: migrate TEGRA_GPIO to Kconfig In-Reply-To: <1461099580-3866-1-git-send-email-swarren@wwwdotorg.org> References: <1461099580-3866-1-git-send-email-swarren@wwwdotorg.org> Message-ID: <1461099580-3866-17-git-send-email-swarren@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Stephen Warren All configuration is migrating to Kconfig. This moves one piece. TEGRA_GPIO is default y since it's almost certain to be needed, and this setting matches the stanza removed from the config header file. CONFIG_HAS_TEGRA_GPIO is introduced so that drivers/gpio/Kconfig doesn't have to know which Tegra chips contain this GPIO controller, thus isolating such knowledge into mach-tegra/Kconfig. All currently supported chips do, but the next chip contains a different GPIO controller and hence requires a different driver. Signed-off-by: Stephen Warren --- arch/arm/mach-tegra/Kconfig | 5 +++++ drivers/gpio/Kconfig | 8 ++++++++ include/configs/tegra-common.h | 1 - 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index ba6983f3dfd3..32ea2f944fa9 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig @@ -1,5 +1,8 @@ if TEGRA +config HAS_TEGRA_GPIO + bool "SoC contains Tegra20..210 GPIO controller" + config TEGRA_COMMON bool "Tegra common options" select DM @@ -19,6 +22,7 @@ config TEGRA_COMMON config TEGRA_ARMV7_COMMON bool "Tegra 32-bit common options" select CPU_V7 + select HAS_TEGRA_GPIO select SPL select SUPPORT_SPL select TEGRA_COMMON @@ -50,6 +54,7 @@ config TEGRA124 config TEGRA210 bool "Tegra210 family" + select HAS_TEGRA_GPIO select TEGRA_ARMV8_COMMON endchoice diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index f56a60621ff0..85700922a2da 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -109,6 +109,14 @@ config SANDBOX_GPIO_COUNT of 'anonymous' GPIOs that do not belong to any device or bank. Select a suitable value depending on your needs. +config TEGRA_GPIO + bool "Tegra20..210 GPIO driver" + depends on DM_GPIO && HAS_TEGRA_GPIO + default y + help + Support for the GPIO controller contained in NVIDIA Tegra20 through + Tegra210. + config GPIO_UNIPHIER bool "UniPhier GPIO" depends on ARCH_UNIPHIER diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h index 776394151661..b6506e2fb3df 100644 --- a/include/configs/tegra-common.h +++ b/include/configs/tegra-common.h @@ -109,7 +109,6 @@ CONFIG_SYS_INIT_RAM_SIZE - \ GENERATED_GBL_DATA_SIZE) -#define CONFIG_TEGRA_GPIO #define CONFIG_CMD_ENTERRCM /* Defines for SPL */ -- 2.8.1