From patchwork Wed Sep 12 22:10:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Warren X-Patchwork-Id: 183464 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 30C4D2C00A0 for ; Thu, 13 Sep 2012 08:13:17 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3E3A52809F; Thu, 13 Sep 2012 00:13:05 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sE5p6tdARGnX; Thu, 13 Sep 2012 00:13:05 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2AC74280BF; Thu, 13 Sep 2012 00:12:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DFAEC2808D for ; Thu, 13 Sep 2012 00:12:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mMsF3sVUOqeA for ; Thu, 13 Sep 2012 00:12:25 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by theia.denx.de (Postfix) with ESMTPS id ACBC4280A5 for ; Thu, 13 Sep 2012 00:12:07 +0200 (CEST) Received: by mail-pz0-f44.google.com with SMTP id f8so1291295dad.3 for ; Wed, 12 Sep 2012 15:12:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-nvconfidentiality; bh=miAjqYiJ/fDEv4QvMI1uSSLO/H/YYbEG0PaXrppdn7c=; b=uK5B+Wvi9+0aVww6I0lE1dDRoaftw/H17RZnBpC09sjlxi3UE566nJAL93WL+WvykS mU1/r2GyVKHsRJ66o4D89FVqpFS1bYgcWhutEOELAJ1GsEKaT5leEERsZ245CcorStcL w7OHl9W9/rlxcQXUPj4AmksNGrR0jOZygS53LQ4Kmd8vVQlbpnKzG6MdFj6JQNd08jSE 7Ab2DSY0wdIzS7xuzQ7iMvoHeHmcJyLFzxN+XAq6Gn0URhM/tD5KWVK3JzCnPvWIBcug nvXG6N3wNT1o1M/HioJYlUWZr2NWo/T+DD0lwlMpXz9o7On0lhqrZuJDbDbPcCetDfTU ROxg== Received: by 10.68.212.161 with SMTP id nl1mr958826pbc.84.1347487927332; Wed, 12 Sep 2012 15:12:07 -0700 (PDT) Received: from localhost.localdomain (ip68-230-103-25.ph.ph.cox.net. [68.230.103.25]) by mx.google.com with ESMTPS id gt2sm12041999pbc.62.2012.09.12.15.12.05 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Sep 2012 15:12:06 -0700 (PDT) From: Tom Warren To: u-boot@lists.denx.de Date: Wed, 12 Sep 2012 15:10:55 -0700 Message-Id: <1347487855-27077-10-git-send-email-twarren@nvidia.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1347487855-27077-1-git-send-email-twarren@nvidia.com> References: <1347487855-27077-1-git-send-email-twarren@nvidia.com> X-NVConfidentiality: public Cc: swarren@nvidia.com, Tom Warren , trini@ti.com, twarren.nvidia@gmail.com Subject: [U-Boot] [PATCH 9/9] Tegra30: Enable Cardhu build (SPL) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This builds & boots to the command prompt on a Cardhu (T30) board. This is a barebones binary - no I2C, USB, MMC, SPI, etc. Drivers for those peripherals to follow. Signed-off-by: Tom Warren --- Makefile | 23 +++++++++++++++++++++++ arch/arm/cpu/armv7/Makefile | 2 +- arch/arm/cpu/armv7/start.S | 4 ++-- boards.cfg | 1 + drivers/gpio/tegra_gpio.c | 4 ++++ include/serial.h | 3 ++- spl/Makefile | 3 +++ 7 files changed, 36 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index d6d8ab2..13f4850 100644 --- a/Makefile +++ b/Makefile @@ -322,6 +322,9 @@ endif ifeq ($(SOC),tegra20) LIBS-y += arch/$(ARCH)/cpu/$(SOC)-common/lib$(SOC)-common.o endif +ifeq ($(SOC),tegra30) +LIBS-y += arch/$(ARCH)/cpu/$(SOC)-common/lib$(SOC)-common.o +endif LIBS := $(addprefix $(obj),$(sort $(LIBS-y))) .PHONY : $(LIBS) @@ -389,6 +392,13 @@ else ALL-y += $(obj)u-boot-nodtb-tegra.bin endif endif +ifeq ($(SOC),tegra30) +ifeq ($(CONFIG_OF_SEPARATE),y) +ALL-y += $(obj)u-boot-dtb-tegra.bin +else +ALL-y += $(obj)u-boot-nodtb-tegra.bin +endif +endif all: $(ALL-y) $(SUBDIR_EXAMPLES) @@ -497,6 +507,19 @@ $(obj)u-boot-nodtb-tegra.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin rm $(obj)spl/u-boot-spl-pad.bin endif endif +ifeq ($(SOC),tegra30) +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 + cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin $(obj)u-boot.dtb > $@ + rm $(obj)spl/u-boot-spl-pad.bin +else +$(obj)u-boot-nodtb-tegra.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin + $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SYS_TEXT_BASE) -O binary $(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin + cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin > $@ + rm $(obj)spl/u-boot-spl-pad.bin +endif +endif ifeq ($(CONFIG_SANDBOX),y) GEN_UBOOT = \ diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile index 4fdbee4..6389d52 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_TEGRA20)$(CONFIG_TEGRA30),) SOBJS += lowlevel_init.o endif diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S index 32658eb..b2bac3e 100644 --- a/arch/arm/cpu/armv7/start.S +++ b/arch/arm/cpu/armv7/start.S @@ -280,14 +280,14 @@ jump_2_ram: /* * Move vector table */ -#if !defined(CONFIG_TEGRA20) +#if !defined(CONFIG_TEGRA) #if !(defined(CONFIG_OMAP44XX) && defined(CONFIG_SPL_BUILD)) /* Set vector address in CP15 VBAR register */ ldr r0, =_start add r0, r0, r9 mcr p15, 0, r0, c12, c0, 0 @Set VBAR #endif -#endif /* !Tegra20 */ +#endif /* !Tegra20 or 30 */ ldr r0, _board_init_r_ofs adr r1, _start diff --git a/boards.cfg b/boards.cfg index 613d6b2..8da07ea 100644 --- a/boards.cfg +++ b/boards.cfg @@ -271,6 +271,7 @@ harmony arm armv7:arm720t harmony nvidia seaboard arm armv7:arm720t seaboard nvidia tegra20 ventana arm armv7:arm720t ventana nvidia tegra20 whistler arm armv7:arm720t whistler nvidia tegra20 +cardhu arm armv7:arm720t cardhu nvidia tegra30 u8500_href arm armv7 u8500 st-ericsson u8500 snowball arm armv7 snowball st-ericsson u8500 actux1_4_16 arm ixp actux1 - - actux1:FLASH2X2 diff --git a/drivers/gpio/tegra_gpio.c b/drivers/gpio/tegra_gpio.c index 747f4cf..6f6dceb 100644 --- a/drivers/gpio/tegra_gpio.c +++ b/drivers/gpio/tegra_gpio.c @@ -30,7 +30,11 @@ #include #include #include +#if defined(CONFIG_TEGRA20) #include +#else /* Tegra30 */ +#include +#endif #include enum { diff --git a/include/serial.h b/include/serial.h index cbdf8a9..acb13de 100644 --- a/include/serial.h +++ b/include/serial.h @@ -31,7 +31,8 @@ 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_TEGRA20) || defined(CONFIG_SYS_COREBOOT) || \ + defined(CONFIG_TEGRA30) extern struct serial_device serial0_device; extern struct serial_device serial1_device; #if defined(CONFIG_SYS_NS16550_SERIAL) diff --git a/spl/Makefile b/spl/Makefile index 476a5e6..a94d381 100644 --- a/spl/Makefile +++ b/spl/Makefile @@ -64,6 +64,9 @@ endif ifeq ($(SOC),tegra20) LIBS-y += arch/$(ARCH)/cpu/$(SOC)-common/lib$(SOC)-common.o endif +ifeq ($(SOC),tegra30) +LIBS-y += arch/$(ARCH)/cpu/$(SOC)-common/lib$(SOC)-common.o +endif # Add GCC lib ifeq ("$(USE_PRIVATE_LIBGCC)", "yes")