[PATCH v2 25/32] bsp/leon3: Use LEON3_GPTIMER_BASE

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Jun 16 06:01:22 UTC 2023


---
 bsps/sparc/leon3/start/cpucounter.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/bsps/sparc/leon3/start/cpucounter.c b/bsps/sparc/leon3/start/cpucounter.c
index 46e0b304e5..05ac62ace8 100644
--- a/bsps/sparc/leon3/start/cpucounter.c
+++ b/bsps/sparc/leon3/start/cpucounter.c
@@ -131,10 +131,14 @@ static void leon3_counter_initialize(void)
 
   gpt = LEON3_Timer_Regs;
 
+#if defined(LEON3_GPTIMER_BASE)
+  leon3_counter_use_gptimer(counter, gpt);
+#else
   if (gpt != NULL) {
     /* Fall back to the first GPTIMER if available */
     leon3_counter_use_gptimer(counter, gpt);
   }
+#endif
 #endif /* LEON3_HAS_ASR_22_23_UP_COUNTER */
 }
 
-- 
2.35.3



More information about the devel mailing list