diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-07-24 19:45:39 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-07-24 19:45:39 +0000 |
commit | dc64acee020085e6938bad72c0c1cd2db4e129f6 (patch) | |
tree | 3df1b0701ffaa81654d2a8b410c056aab9de00ce | |
parent | ac5b23ae00382fb6b804596d33c6e8260c43fd12 (diff) |
2011-07-24 Joel Sherrill <joel.sherrilL@OARcorp.com>
* clock/ckinit.c: Correct back port.
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/ChangeLog | 4 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/clock/ckinit.c | 6 |
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); |