From patchwork Fri Nov 23 22:23:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Dureghello X-Patchwork-Id: 201421 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 80B002C03E7 for ; Sat, 24 Nov 2012 09:23:51 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A1E744A025; Fri, 23 Nov 2012 23:23:48 +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 XepngQVIepJT; Fri, 23 Nov 2012 23:23:48 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3B20F4A01C; Fri, 23 Nov 2012 23:23:47 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AE8484A01C for ; Fri, 23 Nov 2012 23:23:44 +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 dlFhVP-mnun4 for ; Fri, 23 Nov 2012 23:23:44 +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-ea0-f172.google.com (mail-ea0-f172.google.com [209.85.215.172]) by theia.denx.de (Postfix) with ESMTPS id 0E6C64A018 for ; Fri, 23 Nov 2012 23:23:42 +0100 (CET) Received: by mail-ea0-f172.google.com with SMTP id a1so3247013eaa.3 for ; Fri, 23 Nov 2012 14:23:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=DP+RJkuoWblKbIAIV0FNH/OaybbchyEb9GJYab09qtg=; b=xACPJSymLIuPzC6DZxA3kSFCUl8Qa16wGY8ZPfAwi6uwMPvGR8Jk5QqAprtBfIVaA3 CSOTHsExFfd2WyMINP1Cts2fsI/EHReWx8zRqycJGh6UvKuMa/Kt7KaMPwfUun7T9BQJ vp60f3SIYnND6gukY1CfmFkj++w/C7lh1hNew6lI3+/JRjirmLKYvhFGM83+BSZw4Lyo 91jYxj5cs74ASHOAPX2nsaBer254r237CkBl3NAQf78mQR727fqueOb00xstgrx1Fcnz CZj3Q3DvYgYyJsMNnBQ+u5SICSci6i3zPmdEihmj1EyEi/MJpGOw/GpZwkBZSRpxusr+ GePQ== Received: by 10.14.209.6 with SMTP id r6mr18058641eeo.34.1353709422362; Fri, 23 Nov 2012 14:23:42 -0800 (PST) Received: from angel3 (host213-233-dynamic.245-95-r.retail.telecomitalia.it. [95.245.233.213]) by mx.google.com with ESMTPS id e1sm16446031eem.3.2012.11.23.14.23.40 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 23 Nov 2012 14:23:41 -0800 (PST) Received: by angel3 (Postfix, from userid 1000) id 43D97403C5C; Fri, 23 Nov 2012 23:23:39 +0100 (CET) Date: Fri, 23 Nov 2012 23:23:39 +0100 From: Angelo Dureghello To: u-Boot@lists.denx.de Message-ID: <20121123222338.GA28670@angel3> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Subject: [U-Boot] [PATCH 1/1] m68k/lib: fix serial driver 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Fix coldfire serial driver bindings no more relocated to ram after last changes to drivers/serial/serial.c (regression). Serial initialization in ram has to be called after that gd->reloc_off is calculated. Signed-off-by: Angelo Dureghello Cc: Jason Jin Acked-by: Jens Scharsig (BuS Elektronik) Tested-by: Jens Scharsig (BuS Elektronik) diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c index 02d73fd..373570c 100644 --- a/arch/m68k/lib/board.c +++ b/arch/m68k/lib/board.c @@ -402,14 +402,14 @@ void board_init_r (gd_t *id, ulong dest_addr) gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */ - serial_initialize(); - debug ("Now running in RAM - U-Boot at: %08lx\n", dest_addr); WATCHDOG_RESET (); gd->reloc_off = dest_addr - CONFIG_SYS_MONITOR_BASE; + serial_initialize(); + monitor_flash_len = (ulong)&__init_end - dest_addr; #if defined(CONFIG_NEEDS_MANUAL_RELOC)