From patchwork Wed Dec 12 12:41:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Schwierzeck X-Patchwork-Id: 205501 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 BE4822C00A4 for ; Wed, 12 Dec 2012 23:42:04 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 415534A25D; Wed, 12 Dec 2012 13:42: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 c7iEMOpi1uQx; Wed, 12 Dec 2012 13:42:03 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9C2F44A261; Wed, 12 Dec 2012 13:42:01 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AD9084A261 for ; Wed, 12 Dec 2012 13:41:59 +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 bdyj-tNj17rs for ; Wed, 12 Dec 2012 13:41:59 +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 mail-bk0-f44.google.com (mail-bk0-f44.google.com [209.85.214.44]) by theia.denx.de (Postfix) with ESMTPS id 09D694A25D for ; Wed, 12 Dec 2012 13:41:57 +0100 (CET) Received: by mail-bk0-f44.google.com with SMTP id w11so321068bku.3 for ; Wed, 12 Dec 2012 04:41:57 -0800 (PST) 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; bh=43o7qgbdKwmiZZISvuj0jIPRn27TyA63QckKadcO9fY=; b=0DKLkdiBAORhAXlD9ncBPVsj71d9v6U+bdNFCCAPS1/yGrOcA7EErqSlytdbtjZJyD oJ63lB5f2DwMAclnN3lZ90eTHxHJcCr+XKkPkTn/E22o5tJOLRzuMbJNpGRk8Zh0v4mK 2cTf5e+cDJImE872e8vJplqwR6zd1f/kfuU380KfrVKPLvEx1ud7t8I7VoPRq6FiMuAk GJ6k35k0Gz8Hxd4F9CfQa26R3aDgOcWstXb+Y0k26dcCtQYHfvW+BtGENYjpxy37cLek st68M41tFUmaTNQvs5Y5xVxJegJtoRl8zBzXs++nCKBT75l2Tr/sr1nmMfvumv4H6lta g3TQ== Received: by 10.204.4.81 with SMTP id 17mr480101bkq.137.1355316117190; Wed, 12 Dec 2012 04:41:57 -0800 (PST) Received: from pc000853.sas.sys.sphairon.com (dslb-094-222-093-193.pools.arcor-ip.net. [94.222.93.193]) by mx.google.com with ESMTPS id i20sm20002850bkw.5.2012.12.12.04.41.55 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Dec 2012 04:41:56 -0800 (PST) From: Daniel Schwierzeck To: u-boot@lists.denx.de Date: Wed, 12 Dec 2012 13:41:51 +0100 Message-Id: <1355316111-16056-1-git-send-email-daniel.schwierzeck@gmail.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1355284370-18117-1-git-send-email-joe.hershberger@ni.com> References: <1355284370-18117-1-git-send-email-joe.hershberger@ni.com> Cc: Tom Rini , Joe Hershberger Subject: [U-Boot] [PATCH v2] 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 From: Joe Hershberger 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 Signed-off-by: Daniel Schwierzeck --- Changes for v2: - include to fix gcc-4.7 warnings This patch depends on http://patchwork.ozlabs.org/patch/205498/ to compile without warnings. arch/mips/lib/board.c | 3 +++ 1 file changed, 3 insertions(+) -- 1.8.0 diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c index 4f330cc..d79e183 100644 --- a/arch/mips/lib/board.c +++ b/arch/mips/lib/board.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -262,6 +263,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