summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-12-01 07:21:43 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-12-06 07:15:00 +0100
commit3b4467412b4171c7660c4a380ee154a65e8729fd (patch)
tree060bce60424d768523b8dadd63daa64be9724f54
parentlibio: Use API mutex (diff)
downloadrtems-3b4467412b4171c7660c4a380ee154a65e8729fd.tar.bz2
bsp/leon3: Enable timer used for CPU counter
In case no clock driver is configured, the corresponding timer may be stopped.
-rw-r--r--c/src/lib/libbsp/sparc/leon3/startup/cpucounter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/startup/cpucounter.c b/c/src/lib/libbsp/sparc/leon3/startup/cpucounter.c
index 7aaf98a2fc..87554ce550 100644
--- a/c/src/lib/libbsp/sparc/leon3/startup/cpucounter.c
+++ b/c/src/lib/libbsp/sparc/leon3/startup/cpucounter.c
@@ -57,6 +57,9 @@ static void leon3_counter_initialize(void)
} else if (gpt != NULL) {
/* Fall back to the first GPTIMER if available */
+ /* Enable timer just in case no clock driver is configured */
+ gpt->timer[LEON3_CLOCK_INDEX].ctrl |= GPTIMER_TIMER_CTRL_EN;
+
_SPARC_Counter_initialize(
_SPARC_Counter_read_address,
_SPARC_Counter_difference_clock_period,