summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2017-10-10 15:09:25 +0200
committerAndrew Jeffery <andrew@aj.id.au>2017-10-21 00:25:01 +1030
commit16f997c564f873b4fdf12fc90ee8a9f6f6080961 (patch)
treec3a393709395d8ba7e5557e600b4332e656b607a /arch
parent2539aab52fad65a52fd37df0d0dc41282afe4d04 (diff)
downloadblackbird-obmc-uboot-16f997c564f873b4fdf12fc90ee8a9f6f6080961.tar.gz
blackbird-obmc-uboot-16f997c564f873b4fdf12fc90ee8a9f6f6080961.zip
aspeed/timer: move static variables under arch_global_data
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 <clg@kaod.org> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-aspeed/timer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-aspeed/timer.c b/arch/arm/mach-aspeed/timer.c
index 626f992429..d4a85116e8 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)
{
OpenPOWER on IntegriCloud