From patchwork Tue Oct 10 13:09:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?C=C3=A9dric_Le_Goater?= X-Patchwork-Id: 823835 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yBHjN136vz9s3w for ; Wed, 11 Oct 2017 00:18:00 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3yBHjM6hhLzDr5x for ; Wed, 11 Oct 2017 00:17:59 +1100 (AEDT) X-Original-To: openbmc@lists.ozlabs.org Delivered-To: openbmc@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=kaod.org (client-ip=46.105.74.227; helo=8.mo178.mail-out.ovh.net; envelope-from=clg@kaod.org; receiver=) X-Greylist: delayed 2397 seconds by postgrey-1.36 at bilbo; Wed, 11 Oct 2017 00:17:54 AEDT Received: from 8.mo178.mail-out.ovh.net (8.mo178.mail-out.ovh.net [46.105.74.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3yBHjG53zczDqlv for ; Wed, 11 Oct 2017 00:17:54 +1100 (AEDT) Received: from player728.ha.ovh.net (b6.ovh.net [213.186.33.56]) by mo178.mail-out.ovh.net (Postfix) with ESMTP id 2F9D55A286 for ; Tue, 10 Oct 2017 15:09:35 +0200 (CEST) Received: from zorba.kaod.org.com (deibp9eh1--blueice3n7.emea.ibm.com [195.212.29.177]) (Authenticated sender: clg@kaod.org) by player728.ha.ovh.net (Postfix) with ESMTPSA id 97BC85400A7; Tue, 10 Oct 2017 15:09:32 +0200 (CEST) From: =?utf-8?q?C=C3=A9dric_Le_Goater?= To: openbmc@lists.ozlabs.org Subject: [PATCH u-boot] aspeed/timer: move static variables under arch_global_data Date: Tue, 10 Oct 2017 15:09:25 +0200 Message-Id: <20171010130925.19345-1-clg@kaod.org> X-Mailer: git-send-email 2.13.6 MIME-Version: 1.0 X-Ovh-Tracer-Id: 14307654541739723522 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedttddrtddtgdegudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?C=C3=A9dric_Le_Goater?= Errors-To: openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "openbmc" The timestamp and lastdec variables are under BSS which is a problem as the timer_init() routine is called in the early init phase. Move them under arch_global_data. Signed-off-by: Cédric Le Goater --- Tested on AST2500 EVB arch/arm/mach-aspeed/timer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-aspeed/timer.c b/arch/arm/mach-aspeed/timer.c index 626f992429b6..d4a85116e80b 100644 --- a/arch/arm/mach-aspeed/timer.c +++ b/arch/arm/mach-aspeed/timer.c @@ -31,8 +31,10 @@ #define READ_CLK (*(volatile ulong *)(AST_TIMER_BASE + 0)) #define READ_TIMER (READ_CLK / CLK_PER_HZ) -static ulong timestamp; -static ulong lastdec; +DECLARE_GLOBAL_DATA_PTR; + +#define timestamp gd->arch.tbl +#define lastdec gd->arch.lastinc int timer_init (void) {