arm: mvebu: timer.c: Explicitly move "init_done" var to data section
authorStefan Roese <sr@denx.de>
Thu, 3 Sep 2015 10:47:07 +0000 (12:47 +0200)
committerLuka Perkov <luka.perkov@sartura.hr>
Thu, 1 Oct 2015 00:00:02 +0000 (02:00 +0200)
As reported by Simon Guinot, commit ade741b3
"arm: mvebu: Call timer_init early before PHY and DDR init" breaks
Kirkwood platforms. As the static variable "init_done" is not
available at that early boot time. This patch moves it to explicitly
to the data section, making it available at that time.

Signed-off-by: Stefan Roese <sr@denx.de>
Reported-by: Simon Guinot <simon.guinot@sequanux.org>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Tested-by: Simon Guinot <simon.guinot@sequanux.org>
arch/arm/mach-mvebu/timer.c

index c516c419edaf2cc75c5403939eb27fd9f8dd33b4..5449a8926c5d2491824a300ed31e27e8596c4352 100644 (file)
@@ -41,7 +41,7 @@
 #define timestamp                      gd->arch.tbl
 #define lastdec                                gd->arch.lastinc
 
-static int init_done;
+static int init_done __attribute__((section(".data"))) = 0;
 
 /* Timer reload and current value registers */
 struct kwtmr_val {