Skip to contentSkip to conversation

arm: socfpga: soc64: Initialize timer in SPL only

PATCH New Chee Hong Ang 2 participants 2 messages Jul 10, 2020 – Jul 14, 2020

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

PATCH 1/1 arm: socfpga: soc64: Initialize timer in SPL only

Timer only need to be initialized once in SPL. This patch remove the redundancy of initializing the timer again in U-Boot proper

---
 arch/arm/mach-socfpga/timer_s10.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-socfpga/timer_s10.c +2 -1
index 3ad98bdb25..7d5598e1a3 100644
@@ -14,6 +14,7 @@
  */
 int timer_init(void)
 {
+#ifdef CONFIG_SPL_BUILD
 	int enable = 0x3;	/* timer enable + output signal masked */
 	int loadval = ~0;
 
@@ -22,6 +23,6 @@ int timer_init(void)
 	/* enable processor pysical counter */
 	asm volatile("msr cntp_ctl_el0, %0" : : "r" (enable));
 	asm volatile("msr cntp_tval_el0, %0" : : "r" (loadval));
-
+#endif
 	return 0;
 }
Signature · 1 line
2.19.0
#1 lore raw

PATCH 1/1 arm: socfpga: soc64: Initialize timer in SPL only

Quoted 12 lines

-----Original Message-----
From: Ang, Chee Hong <[email protected]>
Sent: Friday, July 10, 2020 11:53 PM
To: u-boot at lists.denx.de
Cc: Marek Vasut <[email protected]>; Simon Goldschmidt <[email protected]>; See, Chin Liang <[email protected]>; Tan, Ley Foon <[email protected]>; Ang, Chee Hong <[email protected]>
Subject: [PATCH] arm: socfpga: soc64: Initialize timer in SPL only

Quoted 6 lines

Timer only need to be initialized once in SPL.
This patch remove the redundancy of initializing the timer again in U-Boot proper

---