[rtems commit] bsp/leon3: Enable timer used for CPU counter
Sebastian Huber
sebh at rtems.org
Wed Dec 6 06:15:22 UTC 2017
Module: rtems
Branch: master
Commit: 3b4467412b4171c7660c4a380ee154a65e8729fd
Changeset: http://git.rtems.org/rtems/commit/?id=3b4467412b4171c7660c4a380ee154a65e8729fd
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Dec 1 07:21:43 2017 +0100
bsp/leon3: Enable timer used for CPU counter
In case no clock driver is configured, the corresponding timer may be
stopped.
---
c/src/lib/libbsp/sparc/leon3/startup/cpucounter.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/c/src/lib/libbsp/sparc/leon3/startup/cpucounter.c b/c/src/lib/libbsp/sparc/leon3/startup/cpucounter.c
index 7aaf98a..87554ce 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,
More information about the vc
mailing list