From a2cfe63eeb6a09c52a748849590a898f1032aeea Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Wed, 16 May 2012 08:21:02 +0000 Subject: [PATCH] tegra: add SDIO1 funcmux entry for UARTA This is based on top of: tegra: add alternate UART1 funcmux entry tegra: add UART1 on GPU funcmux entry v2: remove enum change Signed-off-by: Lucas Stach Acked-by: Stephen Warren CC: Stephen Warren CC: Tom Warren CC: Marek Vasut Signed-off-by: Tom Warren --- arch/arm/cpu/armv7/tegra2/board.c | 2 ++ arch/arm/cpu/armv7/tegra2/funcmux.c | 5 +++++ arch/arm/include/asm/arch-tegra2/funcmux.h | 1 + 3 files changed, 8 insertions(+) diff --git a/arch/arm/cpu/armv7/tegra2/board.c b/arch/arm/cpu/armv7/tegra2/board.c index 6106ef9992..923678d063 100644 --- a/arch/arm/cpu/armv7/tegra2/board.c +++ b/arch/arm/cpu/armv7/tegra2/board.c @@ -106,6 +106,8 @@ static int uart_configs[] = { FUNCMUX_UART1_UAA_UAB, #elif defined(CONFIG_TEGRA2_UARTA_GPU) FUNCMUX_UART1_GPU, +#elif defined(CONFIG_TEGRA2_UARTA_SDIO1) + FUNCMUX_UART1_SDIO1, #else FUNCMUX_UART1_IRRX_IRTX, #endif diff --git a/arch/arm/cpu/armv7/tegra2/funcmux.c b/arch/arm/cpu/armv7/tegra2/funcmux.c index c27908821a..155986932a 100644 --- a/arch/arm/cpu/armv7/tegra2/funcmux.c +++ b/arch/arm/cpu/armv7/tegra2/funcmux.c @@ -50,6 +50,11 @@ int funcmux_select(enum periph_id id, int config) pinmux_tristate_disable(PINGRP_GPU); bad_config = 0; break; + case FUNCMUX_UART1_SDIO1: + pinmux_set_func(PINGRP_SDIO1, PMUX_FUNC_UARTA); + pinmux_tristate_disable(PINGRP_SDIO1); + bad_config = 0; + break; } if (!bad_config) { /* diff --git a/arch/arm/include/asm/arch-tegra2/funcmux.h b/arch/arm/include/asm/arch-tegra2/funcmux.h index dba2cf50d0..19184d1d29 100644 --- a/arch/arm/include/asm/arch-tegra2/funcmux.h +++ b/arch/arm/include/asm/arch-tegra2/funcmux.h @@ -32,6 +32,7 @@ enum { FUNCMUX_UART1_IRRX_IRTX = 0, FUNCMUX_UART1_UAA_UAB, FUNCMUX_UART1_GPU, + FUNCMUX_UART1_SDIO1, FUNCMUX_UART2_IRDA = 0, FUNCMUX_UART4_GMC = 0, -- 2.25.1