Skip to contentSkip to conversation

arm: mvebu: timer.c: Explicitly move "init_done" var to data section

PATCH New Stefan Roese 2 participants 2 messages Sep 3, 2015 – Sep 17, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: mvebu: timer.c: Explicitly move "init_done" var to data section

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.

---
 arch/arm/mach-mvebu/timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-mvebu/timer.c +1 -1
index c516c41..5449a89 100644
@@ -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 {
Signature · 1 line
2.5.1
#1 lore raw

PATCH 1/1 arm: mvebu: timer.c: Explicitly move "init_done" var to data section

Quoted 9 lines · Stefan Roese

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.

Thanks,

Simon

Quoted 24 lines
---
 arch/arm/mach-mvebu/timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-mvebu/timer.c +1 -1
index c516c41..5449a89 100644
@@ -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 {
Signature · 6 lines
2.5.1

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150917/a3f5697b/attachment.sig>