From patchwork Wed Dec 12 03:52:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Hershberger X-Patchwork-Id: 205355 X-Patchwork-Delegate: daniel.schwierzeck@googlemail.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 BBE242C0085 for ; Wed, 12 Dec 2012 14:53:45 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6C6794A1A0; Wed, 12 Dec 2012 04:53:42 +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 BGTjMEHwSsqJ; Wed, 12 Dec 2012 04:53:42 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C5F284A199; Wed, 12 Dec 2012 04:53:40 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9E29C4A199 for ; Wed, 12 Dec 2012 04:53:38 +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 wKKc7+y8E2rn for ; Wed, 12 Dec 2012 04:53:37 +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 spamkiller06.natinst.com (mailserver6.natinst.com [130.164.80.6]) by theia.denx.de (Postfix) with ESMTP id B84524A197 for ; Wed, 12 Dec 2012 04:53:34 +0100 (CET) Received: from mailserv59-us.natinst.com (nb-hsrp-1338.natinst.com [130.164.19.133]) by spamkiller06.natinst.com (8.14.5/8.14.5) with ESMTP id qBC3rPAF000348; Tue, 11 Dec 2012 21:53:25 -0600 Received: from linux-xvxi.natinst.com ([130.164.14.197]) by mailserv59-us.natinst.com (Lotus Domino Release 8.5.3FP2 HF169) with ESMTP id 2012121121532560-308668 ; Tue, 11 Dec 2012 21:53:25 -0600 From: Joe Hershberger To: u-boot@lists.denx.de Date: Tue, 11 Dec 2012 21:52:50 -0600 Message-Id: <1355284370-18117-1-git-send-email-joe.hershberger@ni.com> X-Mailer: git-send-email 1.7.11.5 X-MIMETrack: Itemize by SMTP Server on MailServ59-US/AUS/H/NIC(Release 8.5.3FP2 HF169|September 14, 2012) at 12/11/2012 09:53:25 PM, Serialize by Router on MailServ59-US/AUS/H/NIC(Release 8.5.3FP2 HF169|September 14, 2012) at 12/11/2012 09:53:25 PM, Serialize complete at 12/11/2012 09:53:25 PM X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.9.8327, 1.0.431, 0.0.0000 definitions=2012-12-12_01:2012-12-12, 2012-12-12, 1970-01-01 signatures=0 Cc: Tom Rini , Joe Hershberger , Shinya Kuribayashi Subject: [U-Boot] [BUGFIX PATCH] mips: serial: Fix busted manual relocation 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 serial_initialize() must be called after relocation to adjust the pointers to putc(), getc(), etc. This is busted ever since the serial driver-model-ification series. Signed-off-by: Joe Hershberger --- arch/mips/lib/board.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c index 7ddd778..e47989b 100644 --- a/arch/mips/lib/board.c +++ b/arch/mips/lib/board.c @@ -262,6 +262,8 @@ void board_init_r(gd_t *id, ulong dest_addr) monitor_flash_len = (ulong)&uboot_end_data - dest_addr; + serial_initialize(); + #if defined(CONFIG_NEEDS_MANUAL_RELOC) /* * We have to relocate the command table manually