public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Warren <twarren.nvidia@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 6/7] Tegra30: Add generic Tegra30 build support
Date: Tue,  2 Oct 2012 15:45:54 -0700	[thread overview]
Message-ID: <1349217955-8729-7-git-send-email-twarren@nvidia.com> (raw)
In-Reply-To: <1349217955-8729-1-git-send-email-twarren@nvidia.com>

This patch adds basic Tegra30 (T30) build support - no specific
board is targeted.

Signed-off-by: Tom Warren <twarren@nvidia.com>
---
 Makefile                    |    6 +++---
 arch/arm/cpu/armv7/Makefile |    2 +-
 arch/arm/cpu/armv7/start.S  |    4 ++--
 board/nvidia/common/board.c |   26 ++++++++++++++++++++++++--
 include/serial.h            |    2 +-
 spl/Makefile                |    2 +-
 6 files changed, 32 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile
index 614f6fe..d7e2c2f 100644
--- a/Makefile
+++ b/Makefile
@@ -323,7 +323,7 @@ endif
 ifeq ($(SOC),exynos)
 LIBS-y += $(CPUDIR)/s5p-common/libs5p-common.o
 endif
-ifeq ($(SOC),tegra20)
+ifneq ($(CONFIG_TEGRA),)
 LIBS-y += arch/$(ARCH)/cpu/$(SOC)-common/lib$(SOC)-common.o
 LIBS-y += arch/$(ARCH)/cpu/tegra-common/libcputegra-common.o
 LIBS-y += $(CPUDIR)/tegra-common/libtegra-common.o
@@ -387,7 +387,7 @@ ALL-$(CONFIG_SPL) += $(obj)spl/u-boot-spl.bin
 ALL-$(CONFIG_OF_SEPARATE) += $(obj)u-boot.dtb $(obj)u-boot-dtb.bin
 
 # enable combined SPL/u-boot/dtb rules for tegra
-ifeq ($(SOC),tegra20)
+ifneq ($(CONFIG_TEGRA),)
 ifeq ($(CONFIG_OF_SEPARATE),y)
 ALL-y += $(obj)u-boot-dtb-tegra.bin
 else
@@ -494,7 +494,7 @@ $(obj)u-boot.spr:	$(obj)u-boot.img $(obj)spl/u-boot-spl.bin
 			conv=notrunc 2>/dev/null
 		cat $(obj)spl/u-boot-spl-pad.img $(obj)u-boot.img > $@
 
-ifeq ($(SOC),tegra20)
+ifneq ($(CONFIG_TEGRA),)
 ifeq ($(CONFIG_OF_SEPARATE),y)
 $(obj)u-boot-dtb-tegra.bin:	$(obj)spl/u-boot-spl.bin $(obj)u-boot.bin $(obj)u-boot.dtb
 		$(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SYS_TEXT_BASE) -O binary $(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin
diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile
index 4fdbee4..ee8c2b3 100644
--- a/arch/arm/cpu/armv7/Makefile
+++ b/arch/arm/cpu/armv7/Makefile
@@ -32,7 +32,7 @@ COBJS	+= cache_v7.o
 COBJS	+= cpu.o
 COBJS	+= syslib.o
 
-ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA20),)
+ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA),)
 SOBJS	+= lowlevel_init.o
 endif
 
diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index f26308d..11317b0 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -272,12 +272,12 @@ jump_2_ram:
 /*
  * Move vector table
  */
-#if !defined(CONFIG_TEGRA20)
+#if !defined(CONFIG_TEGRA)
 	/* Set vector address in CP15 VBAR register */
 	ldr     r0, =_start
 	add     r0, r0, r9
 	mcr     p15, 0, r0, c12, c0, 0  @Set VBAR
-#endif /* !Tegra20 */
+#endif /* !Tegra */
 
 	ldr	r0, _board_init_r_ofs
 	adr	r1, _start
diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c
index 2c7cd0d..151d972 100644
--- a/board/nvidia/common/board.c
+++ b/board/nvidia/common/board.c
@@ -31,15 +31,20 @@
 #include <asm/arch/pinmux.h>
 #include <asm/arch/pmu.h>
 #include <asm/arch/tegra.h>
-#include <asm/arch/usb.h>
 #include <asm/arch-tegra/board.h>
 #include <asm/arch-tegra/clk_rst.h>
 #include <asm/arch-tegra/pmc.h>
 #include <asm/arch-tegra/sys_proto.h>
 #include <asm/arch-tegra/uart.h>
 #include <asm/arch-tegra/warmboot.h>
-#include <spi.h>
+#ifdef CONFIG_USB_EHCI_TEGRA
+#include <asm/arch/usb.h>
+#endif
+#ifdef CONFIG_TEGRA30
+#include <asm/arch/pinmux-config-common.h>
+#endif
 #include <i2c.h>
+#include <spi.h>
 #include "emc.h"
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -101,6 +106,21 @@ static void power_det_init(void)
 }
 
 /*
+ * 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.
  */
@@ -169,6 +189,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 */
diff --git a/include/serial.h b/include/serial.h
index d76d6df..75d76e6 100644
--- a/include/serial.h
+++ b/include/serial.h
@@ -31,7 +31,7 @@ extern struct serial_device *default_serial_console(void);
 	defined(CONFIG_MB86R0x) || defined(CONFIG_MPC5xxx) || \
 	defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) || \
 	defined(CONFIG_MPC86xx) || defined(CONFIG_SYS_SC520) || \
-	defined(CONFIG_TEGRA20) || defined(CONFIG_SYS_COREBOOT) || \
+	defined(CONFIG_TEGRA) || defined(CONFIG_SYS_COREBOOT) || \
 	defined(CONFIG_MICROBLAZE)
 extern struct serial_device serial0_device;
 extern struct serial_device serial1_device;
diff --git a/spl/Makefile b/spl/Makefile
index 8c6dcbd..7d6df9d 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -62,7 +62,7 @@ ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),)
 LIBS-y += $(CPUDIR)/omap-common/libomap-common.o
 endif
 
-ifeq ($(SOC),tegra20)
+ifneq ($(CONFIG_TEGRA),)
 LIBS-y += arch/$(ARCH)/cpu/$(SOC)-common/lib$(SOC)-common.o
 LIBS-y += arch/$(ARCH)/cpu/tegra-common/libcputegra-common.o
 LIBS-y += $(CPUDIR)/tegra-common/libtegra-common.o
-- 
1.7.0.4

  parent reply	other threads:[~2012-10-02 22:45 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-02 22:45 [U-Boot] [PATCH 0/7] Add T30 Cardhu support Tom Warren
2012-10-02 22:45 ` [U-Boot] [PATCH 1/7] Tegra30: Add AVP (arm720t) files Tom Warren
2012-10-03 18:23   ` Stephen Warren
2012-10-03 20:15     ` Tom Warren
2012-10-04  1:11     ` Simon Glass
2012-10-04  0:57   ` Simon Glass
2012-10-02 22:45 ` [U-Boot] [PATCH 2/7] Tegra30: Add CPU (armv7) files Tom Warren
2012-10-03 18:26   ` Stephen Warren
2012-10-03 20:03     ` Tom Warren
2012-10-02 22:45 ` [U-Boot] [PATCH 3/7] Tegra30: Add common CPU (shared) files Tom Warren
2012-10-03 19:49   ` Stephen Warren
2012-10-03 20:27     ` Tom Warren
2012-10-02 22:45 ` [U-Boot] [PATCH 4/7] Tegra30: Add arch-tegra30 include files Tom Warren
2012-10-03 20:31   ` Stephen Warren
2012-10-03 21:48     ` Tom Warren
2012-10-03 22:32       ` Stephen Warren
2012-10-02 22:45 ` [U-Boot] [PATCH 5/7] Tegra30: Cardhu: Add DT files Tom Warren
2012-10-03  0:07   ` Lucas Stach
2012-10-03 16:05     ` Tom Warren
2012-10-03 20:36   ` Stephen Warren
2012-10-03 21:49     ` Tom Warren
2012-10-02 22:45 ` Tom Warren [this message]
2012-10-03 20:38   ` [U-Boot] [PATCH 6/7] Tegra30: Add generic Tegra30 build support Stephen Warren
2012-10-03 21:56     ` Tom Warren
2012-10-03 22:27       ` Stephen Warren
2012-10-02 22:45 ` [U-Boot] [PATCH 7/7] Tegra30: Add/enable Cardhu build (T30 reference board) Tom Warren
2012-10-03 20:46   ` Stephen Warren
2012-10-03 21:05     ` Tom Warren
2012-10-03 16:46 ` [U-Boot] [PATCH 0/7] Add T30 Cardhu support Stephen Warren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1349217955-8729-7-git-send-email-twarren@nvidia.com \
    --to=twarren.nvidia@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox