summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-07-24 19:45:39 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-07-24 19:45:39 +0000
commitdc64acee020085e6938bad72c0c1cd2db4e129f6 (patch)
tree3df1b0701ffaa81654d2a8b410c056aab9de00ce
parent2011-07-22 Joel Sherrill <joel.sherrilL@OARcorp.com> (diff)
downloadrtems-dc64acee020085e6938bad72c0c1cd2db4e129f6.tar.bz2
2011-07-24 Joel Sherrill <joel.sherrilL@OARcorp.com>
* clock/ckinit.c: Correct back port.
-rw-r--r--c/src/lib/libbsp/sparc/leon3/ChangeLog4
-rw-r--r--c/src/lib/libbsp/sparc/leon3/clock/ckinit.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/ChangeLog b/c/src/lib/libbsp/sparc/leon3/ChangeLog
index 561d61c555..72ac05126c 100644
--- a/c/src/lib/libbsp/sparc/leon3/ChangeLog
+++ b/c/src/lib/libbsp/sparc/leon3/ChangeLog
@@ -1,3 +1,7 @@
+2011-07-24 Joel Sherrill <joel.sherrilL@OARcorp.com>
+
+ * clock/ckinit.c: Correct back port.
+
2011-04-25 Jennifer Averett <jennifer.averett@OARcorp.com>
PR 1783/bsps
diff --git a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
index 59eb10c4d7..8cccfa93fa 100644
--- a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
+++ b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
@@ -6,7 +6,7 @@
* The tick frequency is directly programmed to the configured number of
* microseconds per tick.
*
- * COPYRIGHT (c) 1989-2006.
+ * COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* Modified for LEON3 BSP.
@@ -99,8 +99,8 @@ uint32_t bsp_clock_nanoseconds_since_last_tick(void)
uint32_t clicks;
uint32_t usecs;
- if ( LEON_Is_interrupt_pending( LEON_INTERRUPT_TIMER1 ) ) {
- clicks = LEON_REG.Timer_Counter_1;
+ clicks = LEON3_Timer_Regs->timer[0].value;
+ if ( LEON_Is_interrupt_pending( clkirq ) ) {
usecs = (2*rtems_configuration_get_microseconds_per_tick() - clicks);
} else {
usecs = (rtems_configuration_get_microseconds_per_tick() - clicks);