summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-01-18 13:13:10 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-01-18 13:15:27 +0100
commit0a4992927d80716b1ef18dff07853a4eab8568e9 (patch)
tree0c6bd80bcf875ade9538dbe062e949d70551bde4
parentac0e02084537194d217da343fab0a17dfbccba8c (diff)
downloadrtems-0a4992927d80716b1ef18dff07853a4eab8568e9.tar.bz2
bsp/leon3: Fix interrupt timestamp timecounter
-rw-r--r--c/src/lib/libbsp/sparc/leon3/clock/ckinit.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
index b2ed5bf5c1..fd699a435d 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