From: Simon Schwarz Date: Tue, 6 Dec 2011 18:39:38 +0100 Subject: [U-Boot] [PATCH V8 4/5] omap-common: fixes BSS overwriting problem In-Reply-To: <1323193179-9551-1-git-send-email-simonschwarzcor@gmail.com> References: <1320078187-28423-1-git-send-email-simonschwarzcor@gmail.com> <1323193179-9551-1-git-send-email-simonschwarzcor@gmail.com> Message-ID: <1323193179-9551-5-git-send-email-simonschwarzcor@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@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 V8 changes: REBASE on u-boot --- 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 db52879..486c34e 100644 --- a/arch/arm/cpu/armv7/omap-common/spl_nand.c +++ b/arch/arm/cpu/armv7/omap-common/spl_nand.c @@ -73,7 +73,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 { -- 1.7.4.1