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: 232 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:41:04 -0000 Delivered-To: patches@linaro.org Received: by 10.224.19.208 with SMTP id c16cs91650qab; Mon, 28 Feb 2011 03:46:30 -0800 (PST) Received: by 10.236.110.1 with SMTP id t1mr9419818yhg.94.1298893590066; Mon, 28 Feb 2011 03:46:30 -0800 (PST) Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by mx.google.com with ESMTPS id m4si8054393yha.50.2011.02.28.03.46.29 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Feb 2011 03:46:30 -0800 (PST) Received-SPF: pass (google.com: domain of aneesh@ti.com designates 198.47.26.153 as permitted sender) client-ip=198.47.26.153; Authentication-Results: mx.google.com; spf=pass (google.com: domain of aneesh@ti.com designates 198.47.26.153 as permitted sender) smtp.mail=aneesh@ti.com 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 Cc: aneesh@ti.com, x-loader@googlegroups.com, patches@linaro.org, john.rigby@linaro.org Subject: [PATCH 11/22] omap4: add serial console support to SPL 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> 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); +}