From f817b0283cce904d0bcb48cf9e641c2b40ba8f38 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 4 Nov 1999 18:05:09 +0000 Subject: The files in libcpu should not be directly dependent on any BSP. In particular, using bsp.h, or getting information from the BSP which should properly be obtained from RTEMS is forbidden. This is necessary to strengthen the division between the BSP independent parts of RTEMS and the BSPs themselves. This started after comments and analysis by Ralf Corsepius . The changes primarily eliminated the need to include bsp.h and peeking at BSP_Configuration. The use of Cpu_table in each BSP needs to be eliminated. --- c/src/lib/libcpu/sh/sh7032/clock/ckinit.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'c/src/lib/libcpu/sh/sh7032/clock') diff --git a/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c b/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c index 885cdbd752..7aef64ed99 100644 --- a/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c +++ b/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c @@ -22,7 +22,7 @@ * $Id$ */ -#include +#include #include @@ -143,7 +143,7 @@ void Install_clock( */ Clock_driver_ticks = 0; - Clock_isrs_const = BSP_Configuration.microseconds_per_tick / 10000; + Clock_isrs_const = rtems_configuration_get_microseconds_per_tick() / 10000; Clock_isrs = Clock_isrs_const; /* @@ -151,7 +151,7 @@ void Install_clock( * wants a clock tick. */ - if ( BSP_Configuration.ticks_per_timeslice ) { + if ( rtems_configuration_get_ticks_per_timeslice() ) { rtems_interrupt_catch( Clock_isr, CLOCK_VECTOR, &Old_ticker ); /* * Hardware specific initialize goes here @@ -191,7 +191,7 @@ void Install_clock( rtems_fatal_error_occurred( RTEMS_NOT_CONFIGURED); /* set counter limits */ - write16( _ITU_COUNTER0_MICROSECOND * BSP_Configuration.microseconds_per_tick, + write16( _ITU_COUNTER0_MICROSECOND * rtems_configuration_get_microseconds_per_tick(), ITU_GRA0); /* start counter */ @@ -214,7 +214,7 @@ void Install_clock( void Clock_exit( void ) { unsigned8 temp8 = 0; - if ( BSP_Configuration.ticks_per_timeslice ) { + if ( rtems_configuration_get_ticks_per_timeslice() ) { /* turn off the timer interrupts */ /* set interrupt priority to 0 */ -- cgit v1.2.3