[rtems commit] bsp/leon3: Fix interrupt timestamp timecounter
Sebastian Huber
sebh at rtems.org
Thu Jan 18 12:15:50 UTC 2018
Module: rtems
Branch: master
Commit: 0a4992927d80716b1ef18dff07853a4eab8568e9
Changeset: http://git.rtems.org/rtems/commit/?id=0a4992927d80716b1ef18dff07853a4eab8568e9
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Jan 18 13:13:10 2018 +0100
bsp/leon3: Fix interrupt timestamp timecounter
---
c/src/lib/libbsp/sparc/leon3/clock/ckinit.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
index b2ed5bf..fd699a4 100644
--- a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
+++ b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
@@ -13,7 +13,7 @@
* COPYRIGHT (c) 2004.
* Gaisler Research.
*
- * Copyright (c) 2014, 2016 embedded brains GmbH
+ * Copyright (c) 2014, 2018 embedded brains GmbH
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -229,6 +229,13 @@ static void leon3_clock_initialize(void)
leon3_tc.tc.tc_frequency = ambapp_freq_get(&ambapp_plb, LEON3_Timer_Adev);
leon3_tc.tc.tc_quality = RTEMS_TIMECOUNTER_QUALITY_CLOCK_DRIVER;
leon3_tc_tick = leon3_tc_tick_irqmp_timestamp_init;
+
+ /*
+ * At least one TSISEL field must be non-zero to enable the timestamp
+ * counter. Use an arbitrary interrupt source.
+ */
+ irqmp_ts->control = 0x1;
+
rtems_timecounter_install(&leon3_tc.tc);
} else {
#ifdef RTEMS_SMP
More information about the vc
mailing list