Patchwork [U-Boot,1/2] tegra: display: add board pinmux

login
register
mail settings
Submitter Marc Dietrich
Date Nov. 25, 2012, 9:26 p.m.
Message ID <188ec76558345094d1c829cf83aff5d792d5b8ef.1353878614.git.marvin24@gmx.de>
Download mbox | patch
Permalink /patch/201570/
State Superseded
Delegated to: Tom Warren
Headers show

Comments

Marc Dietrich - Nov. 25, 2012, 9:26 p.m.
Boards may require a different pinmux setup for DISPALY than the default one.
Add a way to call into board specific code to set this up.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
---
 arch/arm/include/asm/arch-tegra/board.h |    7 ++++---
 board/nvidia/common/board.c             |    7 +++++++
 2 files changed, 11 insertions(+), 3 deletions(-)
Tom Warren - Nov. 26, 2012, 4:55 p.m.
Marc,

>Boards may require a different pinmux setup for DISPALY than the default one.

s/b 'DISPLAY'

>-void pin_mux_usb(void);      /* overrideable USB pinmux setup   */
>-void pin_mux_spi(void);      /* overrideable SPI pinmux setup   */
>-void pin_mux_nand(void);     /* overrideable NAND pinmux setup  */
>+void pin_mux_usb(void);      /* overrideable USB pinmux setup     */
>+void pin_mux_spi(void);      /* overrideable SPI pinmux setup     */
>+void pin_mux_nand(void);     /* overrideable NAND pinmux setup    */
>+void pin_mux_display(void);  /* overrideable DISPLAY pinmux setup */

Don't pad the end of the other comments just to match up with your new
DISPLAY proto comment. Had to look at this twice to see what you were
really doing here.

Otherwise this patchset LGTM. I'll apply it to tegra/next once you've
fixed these nits.

Tom

On Sun, Nov 25, 2012 at 2:26 PM, Marc Dietrich <marvin24@gmx.de> wrote:
> Boards may require a different pinmux setup for DISPALY than the default one.
> Add a way to call into board specific code to set this up.
>
> Signed-off-by: Marc Dietrich <marvin24@gmx.de>
> ---
>  arch/arm/include/asm/arch-tegra/board.h |    7 ++++---
>  board/nvidia/common/board.c             |    7 +++++++
>  2 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/include/asm/arch-tegra/board.h b/arch/arm/include/asm/arch-tegra/board.h
> index be6bf25..3db0d93 100644
> --- a/arch/arm/include/asm/arch-tegra/board.h
> +++ b/arch/arm/include/asm/arch-tegra/board.h
> @@ -41,8 +41,9 @@ void gpio_early_init(void);  /* overrideable GPIO config        */
>   * an empty stub function will be called.
>   */
>
> -void pin_mux_usb(void);      /* overrideable USB pinmux setup   */
> -void pin_mux_spi(void);      /* overrideable SPI pinmux setup   */
> -void pin_mux_nand(void);     /* overrideable NAND pinmux setup  */
> +void pin_mux_usb(void);      /* overrideable USB pinmux setup     */
> +void pin_mux_spi(void);      /* overrideable SPI pinmux setup     */
> +void pin_mux_nand(void);     /* overrideable NAND pinmux setup    */
> +void pin_mux_display(void);  /* overrideable DISPLAY pinmux setup */
>
>  #endif
> diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c
> index 76ec687..819c120 100644
> --- a/board/nvidia/common/board.c
> +++ b/board/nvidia/common/board.c
> @@ -87,6 +87,12 @@ void __pin_mux_nand(void)
>
>  void pin_mux_nand(void) __attribute__((weak, alias("__pin_mux_nand")));
>
> +void __pin_mux_display(void)
> +{
> +}
> +
> +void pin_mux_display(void) __attribute__((weak, alias("__pin_mux_display")));
> +
>  /*
>   * Routine: power_det_init
>   * Description: turn off power detects
> @@ -126,6 +132,7 @@ int board_init(void)
>                 debug("%s: Failed to init pwm\n", __func__);
>  #endif
>  #ifdef CONFIG_LCD
> +       pin_mux_display();
>         tegra_lcd_check_next_stage(gd->fdt_blob, 0);
>  #endif
>         /* boot param addr */
> --
> 1.7.9.5
>
Marc Dietrich - Nov. 26, 2012, 8:51 p.m.
Hi Tom,

On Monday 26 November 2012 09:55:49 Tom Warren wrote:
> >Boards may require a different pinmux setup for DISPALY than the default
> >one.
> s/b 'DISPLAY'

ups.

> >-void pin_mux_usb(void);      /* overrideable USB pinmux setup   */
> >-void pin_mux_spi(void);      /* overrideable SPI pinmux setup   */
> >-void pin_mux_nand(void);     /* overrideable NAND pinmux setup  */
> >+void pin_mux_usb(void);      /* overrideable USB pinmux setup     */
> >+void pin_mux_spi(void);      /* overrideable SPI pinmux setup     */
> >+void pin_mux_nand(void);     /* overrideable NAND pinmux setup    */
> >+void pin_mux_display(void);  /* overrideable DISPLAY pinmux setup */
> 
> Don't pad the end of the other comments just to match up with your new
> DISPLAY proto comment. Had to look at this twice to see what you were
> really doing here.

yeah, I had to decide whether to create an ugly patch or an ugly comment.
Will choose the other solution then.

Marc
 
> Otherwise this patchset LGTM. I'll apply it to tegra/next once you've
> fixed these nits.
> 
> Tom
> 
> On Sun, Nov 25, 2012 at 2:26 PM, Marc Dietrich <marvin24@gmx.de> wrote:
> > Boards may require a different pinmux setup for DISPALY than the default
> > one. Add a way to call into board specific code to set this up.
> > 
> > Signed-off-by: Marc Dietrich <marvin24@gmx.de>
> > ---
> > 
> >  arch/arm/include/asm/arch-tegra/board.h |    7 ++++---
> >  board/nvidia/common/board.c             |    7 +++++++
> >  2 files changed, 11 insertions(+), 3 deletions(-)
> > 
> > diff --git a/arch/arm/include/asm/arch-tegra/board.h
> > b/arch/arm/include/asm/arch-tegra/board.h index be6bf25..3db0d93 100644
> > --- a/arch/arm/include/asm/arch-tegra/board.h
> > +++ b/arch/arm/include/asm/arch-tegra/board.h
> > @@ -41,8 +41,9 @@ void gpio_early_init(void);  /* overrideable GPIO config
> >        */> 
> >   * an empty stub function will be called.
> >   */
> > 
> > -void pin_mux_usb(void);      /* overrideable USB pinmux setup   */
> > -void pin_mux_spi(void);      /* overrideable SPI pinmux setup   */
> > -void pin_mux_nand(void);     /* overrideable NAND pinmux setup  */
> > +void pin_mux_usb(void);      /* overrideable USB pinmux setup     */
> > +void pin_mux_spi(void);      /* overrideable SPI pinmux setup     */
> > +void pin_mux_nand(void);     /* overrideable NAND pinmux setup    */
> > +void pin_mux_display(void);  /* overrideable DISPLAY pinmux setup */
> > 
> >  #endif
> > 
> > diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c
> > index 76ec687..819c120 100644
> > --- a/board/nvidia/common/board.c
> > +++ b/board/nvidia/common/board.c
> > @@ -87,6 +87,12 @@ void __pin_mux_nand(void)
> > 
> >  void pin_mux_nand(void) __attribute__((weak, alias("__pin_mux_nand")));
> > 
> > +void __pin_mux_display(void)
> > +{
> > +}
> > +
> > +void pin_mux_display(void) __attribute__((weak,
> > alias("__pin_mux_display"))); +
> > 
> >  /*
> >  
> >   * Routine: power_det_init
> >   * Description: turn off power detects
> > 
> > @@ -126,6 +132,7 @@ int board_init(void)
> > 
> >                 debug("%s: Failed to init pwm\n", __func__);
> >  
> >  #endif
> >  #ifdef CONFIG_LCD
> > 
> > +       pin_mux_display();
> > 
> >         tegra_lcd_check_next_stage(gd->fdt_blob, 0);
> >  
> >  #endif
> >  
> >         /* boot param addr */
> > 
> > --
> > 1.7.9.5

Patch

diff --git a/arch/arm/include/asm/arch-tegra/board.h b/arch/arm/include/asm/arch-tegra/board.h
index be6bf25..3db0d93 100644
--- a/arch/arm/include/asm/arch-tegra/board.h
+++ b/arch/arm/include/asm/arch-tegra/board.h
@@ -41,8 +41,9 @@  void gpio_early_init(void);  /* overrideable GPIO config        */
  * an empty stub function will be called.
  */
 
-void pin_mux_usb(void);      /* overrideable USB pinmux setup   */
-void pin_mux_spi(void);      /* overrideable SPI pinmux setup   */
-void pin_mux_nand(void);     /* overrideable NAND pinmux setup  */
+void pin_mux_usb(void);      /* overrideable USB pinmux setup     */
+void pin_mux_spi(void);      /* overrideable SPI pinmux setup     */
+void pin_mux_nand(void);     /* overrideable NAND pinmux setup    */
+void pin_mux_display(void);  /* overrideable DISPLAY pinmux setup */
 
 #endif
diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c
index 76ec687..819c120 100644
--- a/board/nvidia/common/board.c
+++ b/board/nvidia/common/board.c
@@ -87,6 +87,12 @@  void __pin_mux_nand(void)
 
 void pin_mux_nand(void) __attribute__((weak, alias("__pin_mux_nand")));
 
+void __pin_mux_display(void)
+{
+}
+
+void pin_mux_display(void) __attribute__((weak, alias("__pin_mux_display")));
+
 /*
  * Routine: power_det_init
  * Description: turn off power detects
@@ -126,6 +132,7 @@  int board_init(void)
 		debug("%s: Failed to init pwm\n", __func__);
 #endif
 #ifdef CONFIG_LCD
+	pin_mux_display();
 	tegra_lcd_check_next_stage(gd->fdt_blob, 0);
 #endif
 	/* boot param addr */