From patchwork Mon Oct 31 16:23:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Schwarz X-Patchwork-Id: 122882 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 401B3B6F72 for ; Tue, 1 Nov 2011 03:24:34 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0FDB42929F; Mon, 31 Oct 2011 17:24:22 +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 1TRqF+gJxt0X; Mon, 31 Oct 2011 17:24:21 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 45D71292A1; Mon, 31 Oct 2011 17:23:48 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E821B2926D for ; Mon, 31 Oct 2011 17:23:43 +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 QebLQiBBdP3f for ; Mon, 31 Oct 2011 17:23:43 +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-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by theia.denx.de (Postfix) with ESMTPS id 2F0E52928B for ; Mon, 31 Oct 2011 17:23:40 +0100 (CET) Received: by mail-fx0-f44.google.com with SMTP id s12so5809338faa.3 for ; Mon, 31 Oct 2011 09:23:40 -0700 (PDT) Received: by 10.223.4.215 with SMTP id 23mr30217218fas.8.1320078219936; Mon, 31 Oct 2011 09:23:39 -0700 (PDT) Received: from localhost.localdomain (DSL01.212.114.252.242.ip-pool.NEFkom.net. [212.114.252.242]) by mx.google.com with ESMTPS id j5sm38783162faf.14.2011.10.31.09.23.38 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 31 Oct 2011 09:23:39 -0700 (PDT) From: Simon Schwarz To: u-boot@lists.denx.de Date: Mon, 31 Oct 2011 17:23:07 +0100 Message-Id: <1320078187-28423-6-git-send-email-simonschwarzcor@gmail.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1320078187-28423-1-git-send-email-simonschwarzcor@gmail.com> References: <1317284033-16188-1-git-send-email-simonschwarzcor@gmail.com> <1320078187-28423-1-git-send-email-simonschwarzcor@gmail.com> Organization: Corscience GmbH & Co. KG Cc: Simon Schwarz Subject: [U-Boot] [PATCH V7 5/5] omap-common: fixes BSS overwriting problem 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: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Simon Schwarz spl_nand overwrote BSS section because it reads a whole block everytime. Now loads the block to spare area and just copy the needed junk to destination. Whole block read is necessary for ecc check! Signed-off-by: Simon Schwarz --- V2 changes: nothing V3 changes: nothing V4 changes: nothing V5 changes: nothing V6 changes: nothing V7 changes: nothing --- arch/arm/cpu/armv7/omap-common/spl_nand.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/arm/cpu/armv7/omap-common/spl_nand.c b/arch/arm/cpu/armv7/omap-common/spl_nand.c index 1b9e171..903255b 100644 --- a/arch/arm/cpu/armv7/omap-common/spl_nand.c +++ b/arch/arm/cpu/armv7/omap-common/spl_nand.c @@ -71,7 +71,8 @@ void spl_nand_load_image(void) CONFIG_SYS_NAND_PAGE_SIZE, (void *)header); spl_parse_image_header(header); nand_spl_load_image(CONFIG_SYS_NAND_SPL_KERNEL_OFFS, - spl_image.size, (void *)spl_image.load_addr); + spl_image.size, + (void *)spl_image.load_addr - sizeof(header)); } else #endif {