Changeset 7fce2ca in rtems
- Timestamp:
- Mar 4, 2011, 2:07:08 PM (9 years ago)
- Branches:
- 4.10
- Children:
- 302784e
- Parents:
- 631a092
- Location:
- c/src/lib/libbsp/sparc/leon3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/sparc/leon3/ChangeLog
r631a092 r7fce2ca 1 2011-03-04 Joel Sherrill <joel.sherrilL@OARcorp.com> 2 3 PR 1748/bsps 4 * clock/ckinit.c, include/leon.h: When the clock tick generates an 5 interrupt WHILE we have interrupts disabled doing a get TOD or 6 uptime, the get nanoseconds handler was returning a bogusly large 7 number. 8 1 9 2011-02-02 Ralf Corsépius <ralf.corsepius@rtems.org> 2 10 -
c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
r631a092 r7fce2ca 98 98 { 99 99 uint32_t clicks; 100 uint32_t usecs; 101 100 102 if ( !LEON3_Timer_Regs ) 101 103 return 0; … … 103 105 clicks = LEON3_Timer_Regs->timer[0].value; 104 106 105 /* Down counter */ 106 return (uint32_t) 107 (rtems_configuration_get_microseconds_per_tick() - clicks) * 1000; 107 if ( LEON_Is_interrupt_pending( clkirq ) ) { 108 clicks = LEON3_Timer_Regs->timer[0].value; 109 usecs = (2*rtems_configuration_get_microseconds_per_tick() - clicks); 110 } else { 111 usecs = (rtems_configuration_get_microseconds_per_tick() - clicks); 112 } 113 return usecs * 1000; 108 114 } 109 115 110 #define Clock_driver_nanoseconds_since_last_tick bsp_clock_nanoseconds_since_last_tick 116 117 #define Clock_driver_nanoseconds_since_last_tick \ 118 bsp_clock_nanoseconds_since_last_tick 111 119 112 120 #include "../../../shared/clockdrv_shell.h" -
c/src/lib/libbsp/sparc/leon3/include/leon.h
r631a092 r7fce2ca 246 246 247 247 #define LEON_Is_interrupt_pending( _source ) \ 248 (LEON3_IrqCtrl_Regs .ipend & (1 << (_source)))248 (LEON3_IrqCtrl_Regs->ipend & (1 << (_source))) 249 249 250 250 #define LEON_Is_interrupt_masked( _source ) \ 251 251 do {\ 252 (LEON3_IrqCtrl_Regs .mask[LEON3_Cpu_Index] & (1 << (_source))); \252 (LEON3_IrqCtrl_Regs->mask[LEON3_Cpu_Index] & (1 << (_source))); \ 253 253 } while (0) 254 254
Note: See TracChangeset
for help on using the changeset viewer.