[U-Boot] [PATCH V2 04/13] ARM: tegra: prototype pinmux_init() in board.h

Stephen Warren swarren at wwwdotorg.org
Fri Mar 21 19:28:52 CET 2014


From: Stephen Warren <swarren at nvidia.com>

pinmux_init() is a board-level function, not a pinmux driver function.
Move the prototype to a board header rather than the driver header.

Signed-off-by: Stephen Warren <swarren at nvidia.com>
Acked-by: Simon Glass <sjg at chromium.org>
---
v2: No change.
---
 arch/arm/include/asm/arch-tegra/board.h     | 1 +
 arch/arm/include/asm/arch-tegra114/pinmux.h | 3 ---
 arch/arm/include/asm/arch-tegra124/pinmux.h | 3 ---
 arch/arm/include/asm/arch-tegra30/pinmux.h  | 3 ---
 board/nvidia/common/board.c                 | 8 ++++++--
 5 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/arch/arm/include/asm/arch-tegra/board.h b/arch/arm/include/asm/arch-tegra/board.h
index 0e698644a0a1..ff773646cbec 100644
--- a/arch/arm/include/asm/arch-tegra/board.h
+++ b/arch/arm/include/asm/arch-tegra/board.h
@@ -24,6 +24,7 @@ void gpio_early_init(void);  /* overrideable GPIO config        */
  * an empty stub function will be called.
  */
 
+void pinmux_init(void);      /* overrideable general 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    */
diff --git a/arch/arm/include/asm/arch-tegra114/pinmux.h b/arch/arm/include/asm/arch-tegra114/pinmux.h
index 93d2ca525cec..a06b24f412ee 100644
--- a/arch/arm/include/asm/arch-tegra114/pinmux.h
+++ b/arch/arm/include/asm/arch-tegra114/pinmux.h
@@ -580,9 +580,6 @@ void pinmux_set_io(enum pmux_pingrp pin, enum pmux_pin_io io);
  */
 void pinmux_config_table(struct pingroup_config *config, int len);
 
-/* Set a group of pins from a table */
-void pinmux_init(void);
-
 /**
  * Set the GP pad configs
  *
diff --git a/arch/arm/include/asm/arch-tegra124/pinmux.h b/arch/arm/include/asm/arch-tegra124/pinmux.h
index 2042f1f7e5a3..900cf4462264 100644
--- a/arch/arm/include/asm/arch-tegra124/pinmux.h
+++ b/arch/arm/include/asm/arch-tegra124/pinmux.h
@@ -584,9 +584,6 @@ void pinmux_set_io(enum pmux_pingrp pin, enum pmux_pin_io io);
  */
 void pinmux_config_table(struct pingroup_config *config, int len);
 
-/* Set a group of pins from a table */
-void pinmux_init(void);
-
 /**
  * Set the GP pad configs
  *
diff --git a/arch/arm/include/asm/arch-tegra30/pinmux.h b/arch/arm/include/asm/arch-tegra30/pinmux.h
index 0704e4d4d4a1..1449f53b333e 100644
--- a/arch/arm/include/asm/arch-tegra30/pinmux.h
+++ b/arch/arm/include/asm/arch-tegra30/pinmux.h
@@ -632,9 +632,6 @@ void pinmux_set_io(enum pmux_pingrp pin, enum pmux_pin_io io);
  */
 void pinmux_config_table(struct pingroup_config *config, int len);
 
-/* Set a group of pins from a table */
-void pinmux_init(void);
-
 /**
  * Set the GP pad configs
  *
diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c
index 3b18e28cc4fe..d3d7bbd19598 100644
--- a/board/nvidia/common/board.c
+++ b/board/nvidia/common/board.c
@@ -48,6 +48,12 @@ const struct tegra_sysinfo sysinfo = {
 	CONFIG_TEGRA_BOARD_STRING
 };
 
+void __pinmux_init(void)
+{
+}
+
+void pinmux_init(void) __attribute__((weak, alias("__pinmux_init")));
+
 void __pin_mux_usb(void)
 {
 }
@@ -176,9 +182,7 @@ void gpio_early_init(void) __attribute__((weak, alias("__gpio_early_init")));
 
 int board_early_init_f(void)
 {
-#if !defined(CONFIG_TEGRA20)
 	pinmux_init();
-#endif
 	board_init_uart_f();
 
 	/* Initialize periph GPIOs */
-- 
1.8.1.5



More information about the U-Boot mailing list