From patchwork Thu Jun 13 03:24:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 250965 X-Patchwork-Delegate: albert.aribaud@free.fr 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 9FD622C0079 for ; Thu, 13 Jun 2013 13:26:58 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6182F4A102; Thu, 13 Jun 2013 05:26:28 +0200 (CEST) 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 poi4jwGdPATa; Thu, 13 Jun 2013 05:26:28 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 395B04A097; Thu, 13 Jun 2013 05:25:38 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 179554A025 for ; Thu, 13 Jun 2013 05:25:26 +0200 (CEST) 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 uhlbmkBBGBHs for ; Thu, 13 Jun 2013 05:25:20 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 BL_NJABL=ERR(-1.5) (only DNSBL check requested) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) by theia.denx.de (Postfix) with ESMTPS id 2141C4A026 for ; Thu, 13 Jun 2013 05:25:11 +0200 (CEST) Received: by mail-oa0-f54.google.com with SMTP id o6so2409564oag.27 for ; Wed, 12 Jun 2013 20:25:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=PJgZm51u5s8Mn/vU8P9hL0sFVunw8UCKJeFYRJStZ3Q=; b=RGZNEvawgA/QHfAc40fYmpKGx6e8T/6CxBCVcd7M0Pn2Gsy910Cq312Ix9h/NCiCz6 7yqj+dGj7YDMNiKWcRh1EOv4UU4KmdU2VvDw7FZT8emYZzMUp/EQWSNI2ndZ7BC87c6Q P+HwPVIfxG4QGTDZcBq+NWGDPRasMtkmNMcQfNKaFWsxgwhNBtqDcG9jmHFOzb8nJ8Kw 1riEOrUyUuk7NVpoZx7/E8QNhPpXBUcbtWTvxNf51TIfEj2w5196kyIf/cWNdB6JA99Q mUNH/wkV+pt4kVx/pbINseCl7f6zkepHeCA+4VjvSNyqw0ptgRjtnHyW3eQC6pE42UMv KhzA== X-Received: by 10.182.61.73 with SMTP id n9mr17565496obr.86.1371093909928; Wed, 12 Jun 2013 20:25:09 -0700 (PDT) Received: from rob-laptop.grandenetworks.net (65-36-73-129.dyn.grandenetworks.net. [65.36.73.129]) by mx.google.com with ESMTPSA id oe10sm37501996oeb.6.2013.06.12.20.25.08 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Jun 2013 20:25:09 -0700 (PDT) From: Rob Herring To: u-boot@lists.denx.de, albert.u.boot@aribaud.net, trini@ti.com Date: Wed, 12 Jun 2013 22:24:50 -0500 Message-Id: <1371093894-16424-6-git-send-email-robherring2@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1371093894-16424-1-git-send-email-robherring2@gmail.com> References: <1371093894-16424-1-git-send-email-robherring2@gmail.com> Cc: Rob Herring Subject: [U-Boot] [PATCH v2 06/10] ARM: highbank: avoid bss write in timer_init 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: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Rob Herring The timer_init function is called before relocation and writes to bss data were corrupting relocation data. Fix this by removing the call to reset_timer_masked. The initial timer count should be 0 or near 0 anyway, so initializing the variables are not needed. Signed-off-by: Rob Herring --- v2: no change, resend arch/arm/cpu/armv7/highbank/timer.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/cpu/armv7/highbank/timer.c b/arch/arm/cpu/armv7/highbank/timer.c index d93de1e..832c012 100644 --- a/arch/arm/cpu/armv7/highbank/timer.c +++ b/arch/arm/cpu/armv7/highbank/timer.c @@ -46,8 +46,6 @@ int timer_init(void) writel(SYSTIMER_EN | SYSTIMER_32BIT | SYSTIMER_PRESC_256, &systimer_base->timer0control); - reset_timer_masked(); - return 0; }