Changeset f817b02 in rtems for c/src/lib/libcpu/mips
- Timestamp:
- 11/04/99 18:05:09 (23 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 707f5c7
- Parents:
- d5704c6
- Location:
- c/src/lib/libcpu/mips
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libcpu/mips/clock/ckinit.c
rd5704c6 rf817b02 44 44 #include <rtems.h> 45 45 #include <rtems/libio.h> 46 #include <bsp.h>47 46 48 47 #define EXT_INT5 0x8000 /* external interrupt 5 */ … … 50 49 #include "clock.h" 51 50 51 /* formerly in the BSP */ 52 #if 0 52 53 #define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) /* equivalent to CPU clock speed in MHz */ 54 #endif 55 56 #define CLOCKS_PER_MICROSECOND \ 57 rtems_cpu_configuration_get_clicks_per_microsecond() 58 /* to avoid including the bsp */ 59 mips_isr_entry set_vector( rtems_isr_entry, rtems_vector_number, int ); 53 60 54 61 void Clock_exit( void ); … … 153 160 154 161 Clock_driver_ticks = 0; 155 Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;162 Clock_isrs = rtems_configuration_get_milliseconds_per_tick(); 156 163 157 164 /* … … 160 167 */ 161 168 162 if ( BSP_Configuration.ticks_per_timeslice) {169 if ( rtems_configuration_get_ticks_per_timeslice() ) { 163 170 Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 ); 164 171 /* … … 166 173 */ 167 174 168 mips_timer_rate = BSP_Configuration.microseconds_per_tick* CLOCKS_PER_MICROSECOND;175 mips_timer_rate = rtems_configuration_get_microseconds_per_tick() * CLOCKS_PER_MICROSECOND; 169 176 mips_set_timer( mips_timer_rate ); 170 177 enable_int(CLOCK_VECTOR_MASK); … … 184 191 void Clock_exit( void ) 185 192 { 186 if ( BSP_Configuration.ticks_per_timeslice ) { 187 193 if ( rtems_configuration_get_ticks_per_timeslice() ) { 188 194 /* mips: turn off the timer interrupts */ 189 195 disable_int(CLOCK_VECTOR_MASK); 190 191 196 } 192 197 } -
c/src/lib/libcpu/mips/timer/timer.c
rd5704c6 rf817b02 48 48 49 49 #include <rtems.h> 50 #include <bsp.h>51 50 52 51 #define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ )
Note: See TracChangeset
for help on using the changeset viewer.