forked from Imagelibrary/rtems
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 <corsepiu@faw.uni-ulm.de>. 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.
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
#include <rtems.h>
|
||||
#include <clockdrv.h>
|
||||
#include <rtems/libio.h>
|
||||
|
||||
@@ -74,7 +74,7 @@ void Install_clock(rtems_isr_entry clock_isr)
|
||||
|
||||
Clock_driver_ticks = 0;
|
||||
|
||||
pit_value = BSP_Configuration.microseconds_per_tick /
|
||||
pit_value = rtems_configuration_get_microseconds_per_tick() /
|
||||
Cpu_table.clicks_per_usec;
|
||||
if (pit_value == 0) {
|
||||
pit_value = 0xffff;
|
||||
@@ -85,7 +85,7 @@ void Install_clock(rtems_isr_entry clock_isr)
|
||||
if (pit_value > 0xffff) { /* pit is only 16 bits long */
|
||||
rtems_fatal_error_occurred(-1);
|
||||
}
|
||||
if (BSP_Configuration.ticks_per_timeslice) {
|
||||
if ( rtems_configuration_get_ticks_per_timeslice() ) {
|
||||
|
||||
/*
|
||||
* initialize the interval here
|
||||
@@ -131,7 +131,7 @@ ReInstall_clock(rtems_isr_entry new_clock_isr)
|
||||
void
|
||||
Clock_exit(void)
|
||||
{
|
||||
if ( BSP_Configuration.ticks_per_timeslice ) {
|
||||
if ( rtems_configuration_get_ticks_per_timeslice() ) {
|
||||
/* disable PIT and PIT interrupts */
|
||||
m860.piscr &= ~(M860_PISCR_PTE | M860_PISCR_PIE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user