[U-Boot] [PATCH 8/9] Tegra30: Add common pinmux config in board_early_init_f

Tom Warren twarren.nvidia at gmail.com
Thu Sep 13 00:10:54 CEST 2012


Signed-off-by: Tom Warren <twarren at nvidia.com>
---
 board/nvidia/common/board.c |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c
index afe832a..4a86c30 100644
--- a/board/nvidia/common/board.c
+++ b/board/nvidia/common/board.c
@@ -1,5 +1,5 @@
 /*
- *  (C) Copyright 2010,2011
+ *  (C) Copyright 2010-2012
  *  NVIDIA Corporation <www.nvidia.com>
  *
  * See file CREDITS for list of people who contributed to this
@@ -25,7 +25,11 @@
 #include <ns16550.h>
 #include <linux/compiler.h>
 #include <asm/io.h>
+#if defined(CONFIG_TEGRA20)
 #include <asm/arch/tegra20.h>
+#else	/* Tegra30 */
+#include <asm/arch/tegra30.h>
+#endif
 #include <asm/arch/sys_proto.h>
 
 #include <asm/arch/board.h>
@@ -87,6 +91,25 @@ static void power_det_init(void)
 #endif
 }
 
+#ifdef CONFIG_TEGRA30
+#include "../cardhu/pinmux-config-common.h"
+#endif
+
+/*
+ * Routine: pinmux_init
+ * Description: Do individual peripheral pinmux configs
+ */
+static void pinmux_init(void)
+{
+#if defined(CONFIG_TEGRA30)
+	pinmux_config_table(tegra3_pinmux_common,
+		ARRAY_SIZE(tegra3_pinmux_common));
+
+	pinmux_config_table(unused_pins_lowpower,
+		ARRAY_SIZE(unused_pins_lowpower));
+#endif
+}
+
 /*
  * Routine: board_init
  * Description: Early hardware init.
@@ -152,6 +175,8 @@ void gpio_early_init(void) __attribute__((weak, alias("__gpio_early_init")));
 
 int board_early_init_f(void)
 {
+	pinmux_init();
+
 	board_init_uart_f();
 
 	/* Initialize periph GPIOs */
-- 
1.7.0.4



More information about the U-Boot mailing list