Patchwork [U-Boot] tegra: add UART1 on GPU funcmux entry

login
register
mail settings
Submitter Stephen Warren
Date May 16, 2012, 3:59 p.m.
Message ID <1337183999-13204-1-git-send-email-swarren@wwwdotorg.org>
Download mbox | patch
Permalink /patch/159703/
State Accepted
Commit e21649be56a0cbe17ea892fc6c1a633369df0d50
Headers show

Comments

Stephen Warren - May 16, 2012, 3:59 p.m.
From: Stephen Warren <swarren@nvidia.com>

TrimSlice uses UART1 on the GPU pingroup.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 arch/arm/cpu/armv7/tegra2/board.c          |    4 +++-
 arch/arm/cpu/armv7/tegra2/funcmux.c        |    5 +++++
 arch/arm/include/asm/arch-tegra2/funcmux.h |    1 +
 3 files changed, 9 insertions(+), 1 deletions(-)
Simon Glass - May 31, 2012, 11:27 p.m.
On Wed, May 16, 2012 at 8:59 AM, Stephen Warren <swarren@wwwdotorg.org>wrote:

> From: Stephen Warren <swarren@nvidia.com>
>

Acked-by: Simon Glass <sjg@chromium.org>


>
> TrimSlice uses UART1 on the GPU pingroup.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
>  arch/arm/cpu/armv7/tegra2/board.c          |    4 +++-
>  arch/arm/cpu/armv7/tegra2/funcmux.c        |    5 +++++
>  arch/arm/include/asm/arch-tegra2/funcmux.h |    1 +
>  3 files changed, 9 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/tegra2/board.c
> b/arch/arm/cpu/armv7/tegra2/board.c
> index 629ad5d..6106ef9 100644
> --- a/arch/arm/cpu/armv7/tegra2/board.c
> +++ b/arch/arm/cpu/armv7/tegra2/board.c
> @@ -102,8 +102,10 @@ int arch_cpu_init(void)
>  #endif
>
>  static int uart_configs[] = {
> -#ifdef CONFIG_TEGRA2_UARTA_UAA_UAB
> +#if defined(CONFIG_TEGRA2_UARTA_UAA_UAB)
>        FUNCMUX_UART1_UAA_UAB,
> +#elif defined(CONFIG_TEGRA2_UARTA_GPU)
> +       FUNCMUX_UART1_GPU,
>  #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 e2d1273..c279088 100644
> --- a/arch/arm/cpu/armv7/tegra2/funcmux.c
> +++ b/arch/arm/cpu/armv7/tegra2/funcmux.c
> @@ -45,6 +45,11 @@ int funcmux_select(enum periph_id id, int config)
>                        pinmux_tristate_disable(PINGRP_UAB);
>                        bad_config = 0;
>                        break;
> +               case FUNCMUX_UART1_GPU:
> +                       pinmux_set_func(PINGRP_GPU, PMUX_FUNC_UARTA);
> +                       pinmux_tristate_disable(PINGRP_GPU);
> +                       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 b455122..dba2cf5 100644
> --- a/arch/arm/include/asm/arch-tegra2/funcmux.h
> +++ b/arch/arm/include/asm/arch-tegra2/funcmux.h
> @@ -31,6 +31,7 @@ enum {
>        /* UART configs */
>        FUNCMUX_UART1_IRRX_IRTX = 0,
>        FUNCMUX_UART1_UAA_UAB,
> +       FUNCMUX_UART1_GPU,
>        FUNCMUX_UART2_IRDA = 0,
>        FUNCMUX_UART4_GMC = 0,
>
> --
> 1.7.0.4
>
>

Patch

diff --git a/arch/arm/cpu/armv7/tegra2/board.c b/arch/arm/cpu/armv7/tegra2/board.c
index 629ad5d..6106ef9 100644
--- a/arch/arm/cpu/armv7/tegra2/board.c
+++ b/arch/arm/cpu/armv7/tegra2/board.c
@@ -102,8 +102,10 @@  int arch_cpu_init(void)
 #endif
 
 static int uart_configs[] = {
-#ifdef CONFIG_TEGRA2_UARTA_UAA_UAB
+#if defined(CONFIG_TEGRA2_UARTA_UAA_UAB)
 	FUNCMUX_UART1_UAA_UAB,
+#elif defined(CONFIG_TEGRA2_UARTA_GPU)
+	FUNCMUX_UART1_GPU,
 #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 e2d1273..c279088 100644
--- a/arch/arm/cpu/armv7/tegra2/funcmux.c
+++ b/arch/arm/cpu/armv7/tegra2/funcmux.c
@@ -45,6 +45,11 @@  int funcmux_select(enum periph_id id, int config)
 			pinmux_tristate_disable(PINGRP_UAB);
 			bad_config = 0;
 			break;
+		case FUNCMUX_UART1_GPU:
+			pinmux_set_func(PINGRP_GPU, PMUX_FUNC_UARTA);
+			pinmux_tristate_disable(PINGRP_GPU);
+			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 b455122..dba2cf5 100644
--- a/arch/arm/include/asm/arch-tegra2/funcmux.h
+++ b/arch/arm/include/asm/arch-tegra2/funcmux.h
@@ -31,6 +31,7 @@  enum {
 	/* UART configs */
 	FUNCMUX_UART1_IRRX_IRTX = 0,
 	FUNCMUX_UART1_UAA_UAB,
+	FUNCMUX_UART1_GPU,
 	FUNCMUX_UART2_IRDA = 0,
 	FUNCMUX_UART4_GMC = 0,