From patchwork Mon Feb 28 11:46:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aneesh V X-Patchwork-Id: 84805 X-Patchwork-Delegate: s-paulraj@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 DE84C1007D2 for ; Mon, 28 Feb 2011 22:48:36 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B7FB8280C8; Mon, 28 Feb 2011 12:48:03 +0100 (CET) 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 CWJZsGhVPBLu; Mon, 28 Feb 2011 12:48:03 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F17CB280D1; Mon, 28 Feb 2011 12:47:07 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2E1A7280A9 for ; Mon, 28 Feb 2011 12:46:41 +0100 (CET) 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 HzOX40dvsuyA for ; Mon, 28 Feb 2011 12:46:38 +0100 (CET) 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 devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by theia.denx.de (Postfix) with ESMTPS id 6AFCC28091 for ; Mon, 28 Feb 2011 12:46:31 +0100 (CET) Received: from dbdp31.itg.ti.com ([172.24.170.98]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id p1SBkQws005942 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 28 Feb 2011 05:46:28 -0600 Received: from localhost (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p1SBkP1G011794; Mon, 28 Feb 2011 17:16:25 +0530 (IST) From: Aneesh V To: u-boot@lists.denx.de Date: Mon, 28 Feb 2011 17:16:20 +0530 Message-Id: <1298893591-17636-12-git-send-email-aneesh@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1298893591-17636-1-git-send-email-aneesh@ti.com> References: <1298893591-17636-1-git-send-email-aneesh@ti.com> Cc: x-loader@googlegroups.com, patches@linaro.org Subject: [U-Boot] [PATCH 11/22] omap4: add serial console support to SPL X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 Signed-off-by: Aneesh V --- arch/arm/cpu/armv7/omap4/board.c | 3 ++ arch/arm/include/asm/omap_common.h | 1 + spl/board/ti/sdp4430/Makefile | 40 ++++++++++++++++++++++++++++++++++++ spl/board/ti/spl-omap.c | 10 +++++++++ 4 files changed, 54 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/armv7/omap4/board.c b/arch/arm/cpu/armv7/omap4/board.c index a5d585b..da79669 100644 --- a/arch/arm/cpu/armv7/omap4/board.c +++ b/arch/arm/cpu/armv7/omap4/board.c @@ -57,6 +57,9 @@ u32 omap_boot_mode(void) void s_init(void) { watchdog_init(); +#ifdef CONFIG_PRELOADER + preloader_console_init(); +#endif } /* diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h index 06c511c..95116f4 100644 --- a/arch/arm/include/asm/omap_common.h +++ b/arch/arm/include/asm/omap_common.h @@ -67,5 +67,6 @@ u32 omap_boot_device(void); u32 omap_boot_mode(void); +void preloader_console_init(void); #endif /* _OMAP_COMMON_H_ */ diff --git a/spl/board/ti/sdp4430/Makefile b/spl/board/ti/sdp4430/Makefile index dd56a40..6a6aa42 100644 --- a/spl/board/ti/sdp4430/Makefile +++ b/spl/board/ti/sdp4430/Makefile @@ -28,6 +28,46 @@ include $(TOPDIR)/config.mk SOBJS = COBJS = +# serial console +$(obj)eabi_compat.c: + @rm -f $@ + @ln -s $(TOPDIR)/arch/arm/lib/eabi_compat.c $@ + +$(obj)string.c: + @rm -f $@ + @ln -s $(TOPDIR)/lib/string.c $@ + +$(obj)vsprintf.c: + @rm -f $@ + @ln -s $(TOPDIR)/lib/vsprintf.c $@ + +$(obj)console.c: + @rm -f $@ + @ln -s $(TOPDIR)/common/console.c $@ + +$(obj)stdio.c: + @rm -f $@ + @ln -s $(TOPDIR)/common/stdio.c $@ + +$(obj)serial.c: + @rm -f $@ + @ln -s $(TOPDIR)/drivers/serial/serial.c $@ + +$(obj)ns16550.c: + @rm -f $@ + @ln -s $(TOPDIR)/drivers/serial/ns16550.c $@ + +$(obj)div64.c: + @rm -f $@ + @ln -s $(TOPDIR)/lib/div64.c $@ + +$(obj)ctype.c: + @rm -f $@ + @ln -s $(TOPDIR)/lib/ctype.c $@ + +COBJS += serial.o ns16550.o string.o vsprintf.o console.o stdio.o +COBJS += ctype.o eabi_compat.o div64.o + # armv7 $(obj)start.S: @rm -f $@ diff --git a/spl/board/ti/spl-omap.c b/spl/board/ti/spl-omap.c index 0e08f4f..57ddb7d 100644 --- a/spl/board/ti/spl-omap.c +++ b/spl/board/ti/spl-omap.c @@ -45,3 +45,13 @@ void board_init_r(gd_t *id, ulong dummy) for (;;) ; } + +void preloader_console_init(void) +{ + gd->bd = &bdata; + gd->flags |= GD_FLG_RELOC; + gd->baudrate = CONFIG_BAUDRATE; + serial_init(); /* serial communications setup */ + printf("\nU-Boot SPL for Texas Instruments OMAP4 (%s - %s)\n", + U_BOOT_DATE, U_BOOT_TIME); +}