From: Tom Warren <twarren.nvidia@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 6/7] Tegra30: Add generic Tegra30 build support
Date: Mon, 3 Dec 2012 16:45:21 -0700 [thread overview]
Message-ID: <1354578322-1834-7-git-send-email-twarren@nvidia.com> (raw)
In-Reply-To: <1354578322-1834-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>
---
V2:
* Use generic CONFIG_TEGRA in Makefile instead of specific SOC test
* Cleanup a couple of include files due to T20/T30 build differences
* Move pinmux_init to board code
Makefile | 6 +++---
arch/arm/cpu/armv7/Makefile | 2 +-
arch/arm/cpu/armv7/start.S | 4 ++--
board/nvidia/common/board.c | 17 ++++++++++++++---
include/serial.h | 2 +-
spl/Makefile | 2 +-
6 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/Makefile b/Makefile
index 8a04727..5bbfbaf 100644
--- a/Makefile
+++ b/Makefile
@@ -344,7 +344,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
@@ -408,7 +408,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
@@ -515,7 +515,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)
nodtb=dtb
dtbfile=$(obj)u-boot.dtb
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 7df97c5..213f452 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 819c120..a4af539 100644
--- a/board/nvidia/common/board.c
+++ b/board/nvidia/common/board.c
@@ -26,22 +26,30 @@
#include <linux/compiler.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
+#ifdef CONFIG_LCD
#include <asm/arch/display.h>
-#include <asm/arch/emc.h>
+#endif
#include <asm/arch/funcmux.h>
#include <asm/arch/pinmux.h>
#include <asm/arch/pmu.h>
+#ifdef CONFIG_PWM_TEGRA
#include <asm/arch/pwm.h>
+#endif
#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_TEGRA_CLOCK_SCALING
+#include <asm/arch/emc.h>
+#endif
+#ifdef CONFIG_USB_EHCI_TEGRA
+#include <asm/arch/usb.h>
+#endif
#include <i2c.h>
+#include <spi.h>
#include "emc.h"
DECLARE_GLOBAL_DATA_PTR;
@@ -188,6 +196,9 @@ void gpio_early_init(void) __attribute__((weak, alias("__gpio_early_init")));
int board_early_init_f(void)
{
+#if defined(CONFIG_TEGRA30)
+ pinmux_init();
+#endif
board_init_uart_f();
/* Initialize periph GPIOs */
diff --git a/include/serial.h b/include/serial.h
index 14f863e..f6bb2b9 100644
--- a/include/serial.h
+++ b/include/serial.h
@@ -32,7 +32,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 6a79c3c..8dee4e0 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -65,7 +65,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
next prev parent reply other threads:[~2012-12-03 23:45 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-03 23:45 [U-Boot] [PATCH v2 0/7] Add support for NVIDIA Tegra30 SoC Tom Warren
2012-12-03 23:45 ` [U-Boot] [PATCH v2 1/7] Tegra30: Add arch-tegra30 include files Tom Warren
2012-12-04 0:22 ` Stephen Warren
2012-12-04 17:42 ` Tom Warren
2012-12-03 23:45 ` [U-Boot] [PATCH v2 2/7] Tegra30: Add AVP (arm720t) files Tom Warren
2012-12-04 0:34 ` Stephen Warren
2012-12-04 17:47 ` Tom Warren
2012-12-03 23:45 ` [U-Boot] [PATCH v2 3/7] Tegra30: Add CPU (armv7) files Tom Warren
2012-12-04 0:36 ` Stephen Warren
2012-12-03 23:45 ` [U-Boot] [PATCH V2 4/7] Tegra30: Add common CPU (shared) files Tom Warren
2012-12-05 20:37 ` Stephen Warren
2012-12-05 21:32 ` Tom Warren
2012-12-05 21:38 ` Stephen Warren
2012-12-05 21:43 ` Tom Warren
2012-12-03 23:45 ` [U-Boot] [PATCH v2 5/7] Tegra30: Cardhu: Add DT files Tom Warren
2012-12-04 0:40 ` Stephen Warren
2012-12-04 0:49 ` Simon Glass
2012-12-04 0:57 ` Stephen Warren
2012-12-04 1:01 ` Simon Glass
2012-12-04 20:29 ` Tom Warren
2012-12-03 23:45 ` Tom Warren [this message]
2012-12-04 0:42 ` [U-Boot] [PATCH v2 6/7] Tegra30: Add generic Tegra30 build support Stephen Warren
2012-12-04 19:48 ` Tom Warren
2012-12-03 23:45 ` [U-Boot] [PATCH v2 7/7] Tegra30: Add/enable Cardhu build (T30 reference board) Tom Warren
2012-12-04 0:53 ` Stephen Warren
2012-12-04 20:22 ` Tom Warren
2012-12-04 20:40 ` Lucas Stach
2012-12-04 21:28 ` Tom Warren
2012-12-04 22:41 ` Stephen Warren
2012-12-08 20:00 ` Simon Glass
2012-12-10 17:05 ` Tom Warren
2012-12-10 19:04 ` Simon Glass
2012-12-04 22:43 ` Stephen Warren
2012-12-05 20:30 ` Tom Warren
2012-12-04 0:07 ` [U-Boot] [PATCH v2 0/7] Add support for NVIDIA Tegra30 SoC 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=1354578322-1834-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