[U-Boot] [PATCH 1/2] tegra: don't hard-code LCD into default TEGRA_DEVICE_SETTINGS

From: Stephen Warren swarren@nvidia.com
Only add "lcd" into TEGRA_DEVICE_SETTINGS if CONFIG_VIDEO_TEGRA. Otherwise, "lcd" is meaningless.
Signed-off-by: Stephen Warren swarren@nvidia.com --- include/configs/tegra-common-post.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h index 74bebb7..f2a70b1 100644 --- a/include/configs/tegra-common-post.h +++ b/include/configs/tegra-common-post.h @@ -133,10 +133,17 @@ #define STDIN_KBD_USB "" #endif
+#ifdef CONFIG_VIDEO_TEGRA +#define STDOUT_LCD ",lcd" +#else +#define STDOUT_LCD "" +#endif + #define TEGRA_DEVICE_SETTINGS \ "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB "\0" \ - "stdout=serial,lcd\0" \ - "stderr=serial,lcd\0" \ + "stdout=serial" STDOUT_LCD "\0" \ + "stderr=serial" STDOUT_LCD "\0" \ + ""
#define CONFIG_EXTRA_ENV_SETTINGS \ TEGRA_DEVICE_SETTINGS \

From: Stephen Warren swarren@nvidia.com
FUNCMUX_ defines should be named after the pin groups they affect, not after the module they're muxing onto those pin groups.
Signed-off-by: Stephen Warren swarren@nvidia.com --- arch/arm/cpu/tegra-common/board.c | 4 ++-- arch/arm/cpu/tegra20-common/funcmux.c | 2 +- arch/arm/include/asm/arch-tegra20/funcmux.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/cpu/tegra-common/board.c b/arch/arm/cpu/tegra-common/board.c index 1ec6c06..15ac0c5 100644 --- a/arch/arm/cpu/tegra-common/board.c +++ b/arch/arm/cpu/tegra-common/board.c @@ -112,8 +112,8 @@ static int uart_configs[] = { FUNCMUX_UART1_SDIO1, #else FUNCMUX_UART1_IRRX_IRTX, - #endif - FUNCMUX_UART2_UARTB, +#endif + FUNCMUX_UART2_UAD, -1, FUNCMUX_UART4_GMC, -1, diff --git a/arch/arm/cpu/tegra20-common/funcmux.c b/arch/arm/cpu/tegra20-common/funcmux.c index a1c55a6..80a9bd9 100644 --- a/arch/arm/cpu/tegra20-common/funcmux.c +++ b/arch/arm/cpu/tegra20-common/funcmux.c @@ -98,7 +98,7 @@ int funcmux_select(enum periph_id id, int config) break;
case PERIPH_ID_UART2: - if (config == FUNCMUX_UART2_UARTB) { + if (config == FUNCMUX_UART2_UAD) { pinmux_set_func(PINGRP_UAD, PMUX_FUNC_UARTB); pinmux_tristate_disable(PINGRP_UAD); } diff --git a/arch/arm/include/asm/arch-tegra20/funcmux.h b/arch/arm/include/asm/arch-tegra20/funcmux.h index 963f021..7f15bce 100644 --- a/arch/arm/include/asm/arch-tegra20/funcmux.h +++ b/arch/arm/include/asm/arch-tegra20/funcmux.h @@ -35,7 +35,7 @@ enum { FUNCMUX_UART1_UAA_UAB, FUNCMUX_UART1_GPU, FUNCMUX_UART1_SDIO1, - FUNCMUX_UART2_UARTB = 0, + FUNCMUX_UART2_UAD = 0, FUNCMUX_UART4_GMC = 0,
/* I2C configs */

On Tue, Jan 22, 2013 at 8:20 AM, Stephen Warren swarren@wwwdotorg.org wrote:
From: Stephen Warren swarren@nvidia.com
FUNCMUX_ defines should be named after the pin groups they affect, not after the module they're muxing onto those pin groups.
Signed-off-by: Stephen Warren swarren@nvidia.com
Acked-by: Simon Glass sjg@chromium.org

On Tue, Jan 22, 2013 at 8:20 AM, Stephen Warren swarren@wwwdotorg.org wrote:
From: Stephen Warren swarren@nvidia.com
Only add "lcd" into TEGRA_DEVICE_SETTINGS if CONFIG_VIDEO_TEGRA. Otherwise, "lcd" is meaningless.
Signed-off-by: Stephen Warren swarren@nvidia.com
Acked-by: Simon Glass sjg@chromium.org
include/configs/tegra-common-post.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h index 74bebb7..f2a70b1 100644 --- a/include/configs/tegra-common-post.h +++ b/include/configs/tegra-common-post.h @@ -133,10 +133,17 @@ #define STDIN_KBD_USB "" #endif
+#ifdef CONFIG_VIDEO_TEGRA +#define STDOUT_LCD ",lcd" +#else +#define STDOUT_LCD "" +#endif
#define TEGRA_DEVICE_SETTINGS \ "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB "\0" \
"stdout=serial,lcd\0" \
"stderr=serial,lcd\0" \
"stdout=serial" STDOUT_LCD "\0" \
"stderr=serial" STDOUT_LCD "\0" \
""
#define CONFIG_EXTRA_ENV_SETTINGS \ TEGRA_DEVICE_SETTINGS \ -- 1.7.10.4
participants (2)
-
Simon Glass
-
Stephen Warren