From patchwork Thu Jan 8 17:18:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 426714 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 8C6C81400D5 for ; Fri, 9 Jan 2015 04:18:45 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0E9554B604; Thu, 8 Jan 2015 18:18:43 +0100 (CET) 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 fDxkw1OI8+4w; Thu, 8 Jan 2015 18:18:42 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4EBE54B5EC; Thu, 8 Jan 2015 18:18:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B2C8D4B5FA for ; Thu, 8 Jan 2015 18:18:37 +0100 (CET) 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 Q0wOUPvTDhrO for ; Thu, 8 Jan 2015 18:18: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 mail.kmu-office.ch (mail.kmu-office.ch [178.209.48.109]) by theia.denx.de (Postfix) with ESMTP id 8DBF84B5EC for ; Thu, 8 Jan 2015 18:18:33 +0100 (CET) Received: from trochilidae.toradex.int (unknown [46.140.72.82]) by mail.kmu-office.ch (Postfix) with ESMTPSA id CDDAA5C0DA6; Thu, 8 Jan 2015 18:17:01 +0100 (CET) From: Stefan Agner To: sbabic@denx.de, u-boot@lists.denx.de Date: Thu, 8 Jan 2015 18:18:25 +0100 Message-Id: <1420737505-32119-1-git-send-email-stefan@agner.ch> X-Mailer: git-send-email 2.2.1 Subject: [U-Boot] [PATCH] arm: vf610: fix boot from SD-card X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 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 Boot from SD-card (and probably also from NAND) was broken since commit d6d07a9bec ("arm: vf610: add NAND support for vf610twr"). It looks like the increased size of U-Boot lead to a situation where the boot ROM overwrote its own stack/heap while loading U-Boot from the SD-card to the SRAM. However, U-Boot worked fine when loaded through USB serial loader directly into SRAM. It looks like loading from SD-card uses other stack/heap location then the serial loader (or maybe no stack or heap at all). This fix moves U-Boot to gfxRAM, which is 512kB in size and is not used by the boot ROM nor the SD-card loader of it. Signed-off-by: Stefan Agner Acked-by: Bill Pringlemeir --- We use U-Boot from gfxRAM on Vybrid since quite a while for the Colibri VF50/VF61 modules in our downstream U-Boot branch. Hence this is quite well tested. Just today I discovered that this is broken on the Tower module. Back then, when I made the offending change, I only tested on the Tower board using the serial loader, since I thought the behaviour should be exactly the same. But now, I know better... :-) If still possible, it would be great to get this into v2015.01... include/configs/vf610twr.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/configs/vf610twr.h b/include/configs/vf610twr.h index 6fd0b17..bd79e81 100644 --- a/include/configs/vf610twr.h +++ b/include/configs/vf610twr.h @@ -125,7 +125,10 @@ #define CONFIG_BOOTDELAY 3 #define CONFIG_LOADADDR 0x82000000 -#define CONFIG_SYS_TEXT_BASE 0x3f008000 + +/* We boot from the gfxRAM area of the OCRAM. */ +#define CONFIG_SYS_TEXT_BASE 0x3f408000 +#define CONFIG_BOARD_SIZE_LIMIT 524288 #define CONFIG_EXTRA_ENV_SETTINGS \ "script=boot.scr\0" \