diff options
Diffstat (limited to 'c/src/lib/libcpu/mips64orion')
-rw-r--r-- | c/src/lib/libcpu/mips64orion/clock/ckinit.c | 19 | ||||
-rw-r--r-- | c/src/lib/libcpu/mips64orion/include/Makefile.in | 4 | ||||
-rw-r--r-- | c/src/lib/libcpu/mips64orion/timer/timer.c | 1 |
3 files changed, 12 insertions, 12 deletions
diff --git a/c/src/lib/libcpu/mips64orion/clock/ckinit.c b/c/src/lib/libcpu/mips64orion/clock/ckinit.c index 60b3187223..c0cdd6f898 100644 --- a/c/src/lib/libcpu/mips64orion/clock/ckinit.c +++ b/c/src/lib/libcpu/mips64orion/clock/ckinit.c @@ -43,13 +43,20 @@ #include <rtems.h> #include <rtems/libio.h> -#include <bsp.h> #define EXT_INT5 0x8000 /* external interrupt 5 */ #include "clock.h" +/* formerly in the BSP */ +#if 0 #define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) /* equivalent to CPU clock speed in MHz */ +#endif + +#define CLOCKS_PER_MICROSECOND \ + rtems_cpu_configuration_get_clicks_per_microsecond() +/* to avoid including the bsp */ +mips_isr_entry set_vector( rtems_isr_entry, rtems_vector_number, int ); void Clock_exit( void ); rtems_isr Clock_isr( rtems_vector_number vector ); @@ -152,20 +159,20 @@ void Install_clock( */ Clock_driver_ticks = 0; - Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000; + Clock_isrs = rtems_configuration_get_milliseconds_per_tick(); /* * If ticks_per_timeslice is configured as non-zero, then the user * wants a clock tick. */ - if ( BSP_Configuration.ticks_per_timeslice ) { + if ( rtems_configuration_get_ticks_per_timeslice() ) { Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 ); /* * Hardware specific initialize goes here */ - mips_timer_rate = BSP_Configuration.microseconds_per_tick * CLOCKS_PER_MICROSECOND; + mips_timer_rate = rtems_configuration_get_microseconds_per_tick() * CLOCKS_PER_MICROSECOND; mips_set_timer( mips_timer_rate ); enable_int(CLOCK_VECTOR_MASK); } @@ -183,11 +190,9 @@ void Install_clock( void Clock_exit( void ) { - if ( BSP_Configuration.ticks_per_timeslice ) { - + if ( rtems_configuration_get_ticks_per_timeslice() ) { /* mips: turn off the timer interrupts */ disable_int(CLOCK_VECTOR_MASK); - } } diff --git a/c/src/lib/libcpu/mips64orion/include/Makefile.in b/c/src/lib/libcpu/mips64orion/include/Makefile.in index 2eae888240..60c41999f0 100644 --- a/c/src/lib/libcpu/mips64orion/include/Makefile.in +++ b/c/src/lib/libcpu/mips64orion/include/Makefile.in @@ -1,10 +1,6 @@ # # $Id$ # -# Install any include files needed by libcpu. -# Mainly this just means bsp.h which would normally be installed -# after libcpu is built. -# This is a bit of a hack. @SET_MAKE@ srcdir = @srcdir@ diff --git a/c/src/lib/libcpu/mips64orion/timer/timer.c b/c/src/lib/libcpu/mips64orion/timer/timer.c index 167a9b3804..dc7c61157e 100644 --- a/c/src/lib/libcpu/mips64orion/timer/timer.c +++ b/c/src/lib/libcpu/mips64orion/timer/timer.c @@ -47,7 +47,6 @@ #include <rtems.h> -#include <bsp.h> #define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) #define TIMER_MAX_VALUE 0xffffffff |