Skip to contentSkip to conversation

socfpga: missing DECLARE_GLOBAL_DATA_PTR in timer.c

U-Boot Pavel Machek 2 participants 2 messages Apr 8, 2015 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

for A in find . -name "*.c"; do if grep DECLARE_GLOBAL_DATA_PTR $A; then echo -n; else echo $A; fi; done

reveals a few files that probably should have DECLARE_GLOBAL_DATA_PTR.

This fixes it for arch/arm/cpu/armv7/socfpga/timer.c .

index 253cde3..2dd8376 100644

arch/arm/cpu/armv7/socfpga/timer.c +2 -0
@@ -8,6 +8,8 @@
 #include <asm/io.h>
 #include <asm/arch/timer.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 #define TIMER_LOAD_VAL		0xFFFFFFFF
 
 static const struct socfpga_timer *timer_base = (void *)CONFIG_SYS_TIMERBASE;
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#1 lore raw
Quoted 13 lines · Pavel Machek

for A in find . -name "*.c"; do if grep DECLARE_GLOBAL_DATA_PTR $A; then echo -n; else echo $A; fi; done

reveals a few files that probably should have DECLARE_GLOBAL_DATA_PTR.

This fixes it for arch/arm/cpu/armv7/socfpga/timer.c .

index 253cde3..2dd8376 100644

arch/arm/cpu/armv7/socfpga/timer.c line 12

Quoted 5 lines
arch/arm/cpu/armv7/socfpga/timer.c +2 -0
@@ -8,6 +8,8 @@
  #include <asm/io.h>
  #include <asm/arch/timer.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+

Hmmm, "gd" is not used in this file at all. So not sure if we should add DECLARE_GLOBAL_DATA_PTR here.

Thanks,
Stefan