summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-07-21 20:52:19 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-07-21 20:52:19 +0000
commitf37f593da4e4d0f56d88de947debd3dbf0101d89 (patch)
tree449ed26831a9e73065e3fd587d3fc0b51f445f37 /c
parent2011-07-21 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff)
downloadrtems-f37f593da4e4d0f56d88de947debd3dbf0101d89.tar.bz2
2011-07-21 Jorge Lopez <jorge.lopez.trescastro@esa.int>
PR 1766/bsps * clock/ckinit.c: Add missing read of Timer_Counter_1.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/sparc/leon2/ChangeLog5
-rw-r--r--c/src/lib/libbsp/sparc/leon2/clock/ckinit.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/sparc/leon2/ChangeLog b/c/src/lib/libbsp/sparc/leon2/ChangeLog
index 158846f733..8cc2152a03 100644
--- a/c/src/lib/libbsp/sparc/leon2/ChangeLog
+++ b/c/src/lib/libbsp/sparc/leon2/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-21 Jorge Lopez <jorge.lopez.trescastro@esa.int>
+
+ PR 1766/bsps
+ * clock/ckinit.c: Add missing read of Timer_Counter_1.
+
2011-06-19 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Fix broken path to clockdrv_shell.h.
diff --git a/c/src/lib/libbsp/sparc/leon2/clock/ckinit.c b/c/src/lib/libbsp/sparc/leon2/clock/ckinit.c
index 0648b89d62..6bd7918aaa 100644
--- a/c/src/lib/libbsp/sparc/leon2/clock/ckinit.c
+++ b/c/src/lib/libbsp/sparc/leon2/clock/ckinit.c
@@ -64,6 +64,8 @@ uint32_t bsp_clock_nanoseconds_since_last_tick(void)
uint32_t clicks;
uint32_t usecs;
+ clicks = LEON_REG.Timer_Counter_1;
+
if ( LEON_Is_interrupt_pending( LEON_INTERRUPT_TIMER1 ) ) {
clicks = LEON_REG.Timer_Counter_1;
usecs = (2*rtems_configuration_get_microseconds_per_tick() - clicks);