[U-Boot] [PATCH 01/11] tegra: introduce config option to do table based pinmux

Lucas Stach dev at lynxeye.de
Thu Jan 24 17:48:10 CET 2013


This disables all pinmux entry points and instead calls pinmux_init() in
early board init, allowing boards to set up the pinmux in one shot, like
it's done with Tegra30.

This option is temporary and can go away once we switched over all
boards to the new pinmux style.

Signed-off-by: Lucas Stach <dev at lynxeye.de>
---
 board/nvidia/common/board.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c
index a4af539..d9d0e59 100644
--- a/board/nvidia/common/board.c
+++ b/board/nvidia/common/board.c
@@ -132,7 +132,9 @@ int board_init(void)
 	gpio_config_uart();
 #endif
 #ifdef CONFIG_TEGRA_SPI
+#ifndef CONFIG_TEGRA_TABLEBASED_PINMUX
 	pin_mux_spi();
+#endif
 	spi_init();
 #endif
 #ifdef CONFIG_PWM_TEGRA
@@ -140,7 +142,9 @@ int board_init(void)
 		debug("%s: Failed to init pwm\n", __func__);
 #endif
 #ifdef CONFIG_LCD
+#ifndef CONFIG_TEGRA_TABLEBASED_PINMUX
 	pin_mux_display();
+#endif
 	tegra_lcd_check_next_stage(gd->fdt_blob, 0);
 #endif
 	/* boot param addr */
@@ -165,14 +169,16 @@ int board_init(void)
 #endif /* CONFIG_TEGRA_I2C */
 
 #ifdef CONFIG_USB_EHCI_TEGRA
+#ifndef CONFIG_TEGRA_TABLEBASED_PINMUX
 	pin_mux_usb();
+#endif
 	board_usb_init(gd->fdt_blob);
 #endif
 #ifdef CONFIG_LCD
 	tegra_lcd_check_next_stage(gd->fdt_blob, 0);
 #endif
 
-#ifdef CONFIG_TEGRA_NAND
+#if defined(CONFIG_TEGRA_NAND) && !defined(CONFIG_TEGRA_TABLEBASED_PINMUX)
 	pin_mux_nand();
 #endif
 
@@ -196,7 +202,7 @@ void gpio_early_init(void) __attribute__((weak, alias("__gpio_early_init")));
 
 int board_early_init_f(void)
 {
-#if defined(CONFIG_TEGRA30)
+#if defined(CONFIG_TEGRA30) || defined(CONFIG_TEGRA_TABLEBASED_PINMUX)
 	pinmux_init();
 #endif
 	board_init_uart_f();
-- 
1.8.0.2



More information about the U-Boot mailing list