From patchwork Mon Feb 7 19:48:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Lilja X-Patchwork-Id: 82128 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 BA267B712B for ; Tue, 8 Feb 2011 06:49:22 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E7CDC281BC; Mon, 7 Feb 2011 20:49:18 +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 UPPxflM958uu; Mon, 7 Feb 2011 20:49:18 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 14B5128106; Mon, 7 Feb 2011 20:49:17 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2819428106 for ; Mon, 7 Feb 2011 20:49:15 +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 OELC0YoSdhvW for ; Mon, 7 Feb 2011 20:49:13 +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.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) by theia.denx.de (Postfix) with ESMTPS id 289FB280EE for ; Mon, 7 Feb 2011 20:49:10 +0100 (CET) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id AE98C40021; Mon, 7 Feb 2011 20:49:09 +0100 (CET) Received: by mail.lysator.liu.se (Postfix, from userid 1674) id A235240022; Mon, 7 Feb 2011 20:49:09 +0100 (CET) Received: from [127.0.0.1] (t4o896p204.telia.com [213.67.152.204]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTP id 2EAE940021; Mon, 7 Feb 2011 20:49:06 +0100 (CET) Message-ID: <4D504CAA.7000302@gmail.com> Date: Mon, 07 Feb 2011 20:48:58 +0100 From: Magnus Lilja User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Stefano Babic References: <1294836544-24512-1-git-send-email-fabio.estevam@freescale.com> <4D2F004B.9090204@denx.de> <4D309716.4000905@freescale.com> <4D4E8E11.2010906@gmail.com> <4D4FD850.3050800@freescale.com> <4D4FFE09.2090709@denx.de> In-Reply-To: <4D4FFE09.2090709@denx.de> X-Virus-Scanned: ClamAV using ClamSMTP Cc: Fabio Estevam , U-Boot@lists.denx.de Subject: Re: [U-Boot] [RFC] ARM: mx31pdk: Use the new relocation scheme 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Hi On 2011-02-07 15:13, Stefano Babic wrote: >>> I have no idea if this breaks other boards but at least it's start >>> for further work. I tried it on the imx31 litekit (which boots from >>> NOR) but that board doesn't seem to boot even before applying >>> Fabios patch, I'll see if I can figure out why that board is broken >>> now. Don't know when though. >> >> I will let others comment about the changes you did in >> arch/arm/cpu/arm1136/start.S Will also try it later today. > > Anyway, arch/arm/cpu/arm1136/start.S cannot be compiled without the > changes suggested by Magnus due to the following lines: > > _nand_boot_ofs > : .word nand_boot - _start > > ":" seems to me wrong in any case and should be fixed. Is this syntax > accepted by newer compiler releases ? > > IMHO board_init_f must be called absolutely before nand_boot. I have > tested the changes suggested by Magnus on a i.MX35 and the board boots > from NAND. However, I do not see the problems with the console, and I > can think they are not related to this issue. > I agree on that last statement, the console thing must be something else. Here's a somewhat cleaner version of my patch. Hope the mail looks ok, I'm having internet connectivity issues this evening so I'm using a @@ -267,10 +259,10 @@ clbss_l:str r2, [r0] /* clear loop... */ */ #ifdef CONFIG_NAND_SPL ldr r0, _nand_boot_ofs - adr r1, _start - add pc, r0, r1 -_nand_boot_ofs: - .word nand_boot - _start + mov pc, r0 + +_nand_boot_ofs: + .word nand_boot #else jump_2_ram: ldr r0, _board_init_r_ofs different installation of Thunderbird than usual. Regards, Magnus diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S index 12545c2..bab2868 100644 --- a/arch/arm/cpu/arm1136/start.S +++ b/arch/arm/cpu/arm1136/start.S @@ -163,15 +163,7 @@ call_board_init_f: bic sp, sp, #7 /* 8-byte alignment for ABI compliance */ ldr r0,=0x00000000 -#ifdef CONFIG_NAND_SPL - bl nand_boot -#else -#ifdef CONFIG_ONENAND_IPL - bl start_oneboot -#else bl board_init_f -#endif /* CONFIG_ONENAND_IPL */ -#endif /* CONFIG_NAND_SPL */ /*------------------------------------------------------------------------------*/