mirror of
https://xff.cz/git/u-boot/
synced 2025-09-07 11:42:13 +02:00
ARM: tegra: Guard pin controller code with a Kconfig symbol
Pin controller code is not relevant on all Tegra SoC generations, so guard it with a Kconfig symbol that can be selected by the generations that need it. This is in preparation for unifying Tegra186 code with the code used on older generations. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
This commit is contained in:
committed by
Tom Warren
parent
1a869c703d
commit
07ea02bc2d
@@ -29,6 +29,9 @@ config TEGRA_IVC
|
|||||||
config TEGRA_MC
|
config TEGRA_MC
|
||||||
bool
|
bool
|
||||||
|
|
||||||
|
config TEGRA_PINCTRL
|
||||||
|
bool
|
||||||
|
|
||||||
config TEGRA_COMMON
|
config TEGRA_COMMON
|
||||||
bool "Tegra common options"
|
bool "Tegra common options"
|
||||||
select BINMAN
|
select BINMAN
|
||||||
@@ -70,6 +73,7 @@ config TEGRA_ARMV7_COMMON
|
|||||||
select TEGRA_GP_PADCTRL
|
select TEGRA_GP_PADCTRL
|
||||||
select TEGRA_MC
|
select TEGRA_MC
|
||||||
select TEGRA_NO_BPMP
|
select TEGRA_NO_BPMP
|
||||||
|
select TEGRA_PINCTRL
|
||||||
|
|
||||||
config TEGRA_ARMV8_COMMON
|
config TEGRA_ARMV8_COMMON
|
||||||
bool "Tegra 64-bit common options"
|
bool "Tegra 64-bit common options"
|
||||||
@@ -117,6 +121,7 @@ config TEGRA210
|
|||||||
select TEGRA_GP_PADCTRL
|
select TEGRA_GP_PADCTRL
|
||||||
select TEGRA_MC
|
select TEGRA_MC
|
||||||
select TEGRA_NO_BPMP
|
select TEGRA_NO_BPMP
|
||||||
|
select TEGRA_PINCTRL
|
||||||
|
|
||||||
config TEGRA186
|
config TEGRA186
|
||||||
bool "Tegra186 family"
|
bool "Tegra186 family"
|
||||||
|
@@ -17,7 +17,7 @@ obj-$(CONFIG_TEGRA_GP_PADCTRL) += ap.o
|
|||||||
obj-y += board.o board2.o
|
obj-y += board.o board2.o
|
||||||
obj-y += cache.o
|
obj-y += cache.o
|
||||||
obj-$(CONFIG_TEGRA_CLKRST) += clock.o
|
obj-$(CONFIG_TEGRA_CLKRST) += clock.o
|
||||||
obj-y += pinmux-common.o
|
obj-$(CONFIG_TEGRA_PINCTRL) += pinmux-common.o
|
||||||
obj-y += powergate.o
|
obj-y += powergate.o
|
||||||
obj-y += xusb-padctl-dummy.o
|
obj-y += xusb-padctl-dummy.o
|
||||||
endif
|
endif
|
||||||
|
@@ -12,7 +12,9 @@
|
|||||||
#if IS_ENABLED(CONFIG_TEGRA_CLKRST)
|
#if IS_ENABLED(CONFIG_TEGRA_CLKRST)
|
||||||
#include <asm/arch/clock.h>
|
#include <asm/arch/clock.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if IS_ENABLED(CONFIG_TEGRA_PINCTRL)
|
||||||
#include <asm/arch/funcmux.h>
|
#include <asm/arch/funcmux.h>
|
||||||
|
#endif
|
||||||
#if IS_ENABLED(CONFIG_TEGRA_MC)
|
#if IS_ENABLED(CONFIG_TEGRA_MC)
|
||||||
#include <asm/arch/mc.h>
|
#include <asm/arch/mc.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -132,6 +134,7 @@ int dram_init(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if IS_ENABLED(CONFIG_TEGRA_PINCTRL)
|
||||||
static int uart_configs[] = {
|
static int uart_configs[] = {
|
||||||
#if defined(CONFIG_TEGRA20)
|
#if defined(CONFIG_TEGRA20)
|
||||||
#if defined(CONFIG_TEGRA_UARTA_UAA_UAB)
|
#if defined(CONFIG_TEGRA_UARTA_UAA_UAB)
|
||||||
@@ -199,9 +202,11 @@ static void setup_uarts(int uart_ids)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void board_init_uart_f(void)
|
void board_init_uart_f(void)
|
||||||
{
|
{
|
||||||
|
#if IS_ENABLED(CONFIG_TEGRA_PINCTRL)
|
||||||
int uart_ids = 0; /* bit mask of which UART ids to enable */
|
int uart_ids = 0; /* bit mask of which UART ids to enable */
|
||||||
|
|
||||||
#ifdef CONFIG_TEGRA_ENABLE_UARTA
|
#ifdef CONFIG_TEGRA_ENABLE_UARTA
|
||||||
@@ -220,6 +225,7 @@ void board_init_uart_f(void)
|
|||||||
uart_ids |= UARTE;
|
uart_ids |= UARTE;
|
||||||
#endif
|
#endif
|
||||||
setup_uarts(uart_ids);
|
setup_uarts(uart_ids);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !CONFIG_IS_ENABLED(OF_CONTROL)
|
#if !CONFIG_IS_ENABLED(OF_CONTROL)
|
||||||
|
@@ -25,8 +25,10 @@
|
|||||||
#if IS_ENABLED(CONFIG_TEGRA_CLKRST)
|
#if IS_ENABLED(CONFIG_TEGRA_CLKRST)
|
||||||
#include <asm/arch/clock.h>
|
#include <asm/arch/clock.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if IS_ENABLED(CONFIG_TEGRA_PINCTRL)
|
||||||
#include <asm/arch/funcmux.h>
|
#include <asm/arch/funcmux.h>
|
||||||
#include <asm/arch/pinmux.h>
|
#include <asm/arch/pinmux.h>
|
||||||
|
#endif
|
||||||
#include <asm/arch/tegra.h>
|
#include <asm/arch/tegra.h>
|
||||||
#ifdef CONFIG_TEGRA_CLOCK_SCALING
|
#ifdef CONFIG_TEGRA_CLOCK_SCALING
|
||||||
#include <asm/arch/emc.h>
|
#include <asm/arch/emc.h>
|
||||||
|
Reference in New Issue
Block a user