Message ID | 1461099580-3866-55-git-send-email-swarren@wwwdotorg.org |
---|---|
State | Rejected |
Delegated to: | Tom Warren |
Headers | show |
On 19 April 2016 at 14:59, Stephen Warren <swarren@wwwdotorg.org> wrote: > From: Stephen Warren <swarren@nvidia.com> > > Remove funcmux calls from the Tegra20 video driver. Knowledge of pinmux > setup must come from either board files or DT; it should not be embedded > into board-agnostic driver code. The DT pinmux bindings do not allow > drivers to derive funcmux-style information, since the DT bindings are > pin-based whereas funcmux is controller-based, so there's no good way to > call the existing funcmux APIs from drivers. Converting drivers to use a > new (as yet non-existent in U-Boot) API that pulls pinmux information from > DT isn't useful for Tegra, since Tegra's DT files don't contain any > per-device pinmux tables, so this would simply be extra code that has no > effect; doesn't actually set up the pinmux. We are left with moving the > pinmux setup functionality into board files. In theory the board files > could be converted later to use DT, but that would be a separate change. > > Signed-off-by: Stephen Warren <swarren@nvidia.com> > --- > board/avionic-design/common/tamonten.c | 1 + > board/compal/paz00/paz00.c | 3 +++ > board/nvidia/harmony/harmony.c | 1 + > board/nvidia/seaboard/seaboard.c | 1 + > board/toradex/colibri_t20/colibri_t20.c | 1 + > drivers/video/tegra.c | 3 --- > 6 files changed, 7 insertions(+), 3 deletions(-) Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/board/avionic-design/common/tamonten.c b/board/avionic-design/common/tamonten.c index 4727ebdc72c8..e5748b01722a 100644 --- a/board/avionic-design/common/tamonten.c +++ b/board/avionic-design/common/tamonten.c @@ -37,4 +37,5 @@ void tegra_board_early_init_f(void) pinmux_tristate_disable(PMUX_PINGRP_ATA); /* for CD GPIO PH2 */ pinmux_tristate_disable(PMUX_PINGRP_ATD); + funcmux_select(PERIPH_ID_DISP1, FUNCMUX_DEFAULT); } diff --git a/board/compal/paz00/paz00.c b/board/compal/paz00/paz00.c index 562a4df1f262..98e7cfdc352c 100644 --- a/board/compal/paz00/paz00.c +++ b/board/compal/paz00/paz00.c @@ -9,6 +9,8 @@ #include <common.h> #include <asm/io.h> +#include <asm/arch/clock.h> +#include <asm/arch/funcmux.h> #include <asm/arch/tegra.h> #include <asm/gpio.h> #include <mach/board_init.h> @@ -39,4 +41,5 @@ void tegra_board_early_init_f(void) pinmux_tristate_disable(PMUX_PINGRP_UAC); /* For CD GPIO PV5 */ pinmux_tristate_disable(PMUX_PINGRP_GPV); + funcmux_select(PERIPH_ID_DISP1, FUNCMUX_DEFAULT); } diff --git a/board/nvidia/harmony/harmony.c b/board/nvidia/harmony/harmony.c index 9429b3b70cc4..f40b9c3b3152 100644 --- a/board/nvidia/harmony/harmony.c +++ b/board/nvidia/harmony/harmony.c @@ -42,4 +42,5 @@ void tegra_board_early_init_f(void) pinmux_tristate_disable(PMUX_PINGRP_DTB); /* For CD GPIO PI5 */ pinmux_tristate_disable(PMUX_PINGRP_ATC); + funcmux_select(PERIPH_ID_DISP1, FUNCMUX_DEFAULT); } diff --git a/board/nvidia/seaboard/seaboard.c b/board/nvidia/seaboard/seaboard.c index 5bd00278e203..8958de2bdcd8 100644 --- a/board/nvidia/seaboard/seaboard.c +++ b/board/nvidia/seaboard/seaboard.c @@ -41,4 +41,5 @@ void tegra_board_early_init_f(void) /* For CD GPIO PI5 */ pinmux_tristate_disable(PMUX_PINGRP_ATC); funcmux_select(PERIPH_ID_KBC, FUNCMUX_DEFAULT); + funcmux_select(PERIPH_ID_DISP1, FUNCMUX_DEFAULT); } diff --git a/board/toradex/colibri_t20/colibri_t20.c b/board/toradex/colibri_t20/colibri_t20.c index 6af76d68392e..aff036ab243c 100644 --- a/board/toradex/colibri_t20/colibri_t20.c +++ b/board/toradex/colibri_t20/colibri_t20.c @@ -62,6 +62,7 @@ void tegra_board_early_init_f(void) pinmux_set_func(PMUX_PINGRP_ATC, PMUX_FUNC_GMI); funcmux_select(PERIPH_ID_SDMMC4, FUNCMUX_SDMMC4_ATB_GMA_4_BIT); pinmux_tristate_disable(PMUX_PINGRP_GMB); + funcmux_select(PERIPH_ID_DISP1, FUNCMUX_DEFAULT); } int tegra_board_init(void) diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c index 5b778777619f..8543c2980cf8 100644 --- a/drivers/video/tegra.c +++ b/drivers/video/tegra.c @@ -14,7 +14,6 @@ #include <asm/gpio.h> #include <asm/io.h> #include <asm/arch/clock.h> -#include <asm/arch/funcmux.h> #include <mach/pinmux.h> #include "tegra_dc.h" @@ -381,8 +380,6 @@ static int handle_stage(const void *blob, struct tegra_lcd_priv *priv) * remove all mention of lcd in the stdout environment * variable. */ - - funcmux_select(PERIPH_ID_DISP1, FUNCMUX_DEFAULT); break; case STAGE_PANEL_VDD: if (dm_gpio_is_valid(&priv->panel_vdd))