summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/mpc821/clock/clock.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-04 18:05:09 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-04 18:05:09 +0000
commitf817b0283cce904d0bcb48cf9e641c2b40ba8f38 (patch)
treef8d686387ff9cf0639e38887ad23aef46e57db94 /c/src/lib/libcpu/powerpc/mpc821/clock/clock.c
parentAdded first stab at mkgnatnewlib. (diff)
downloadrtems-f817b0283cce904d0bcb48cf9e641c2b40ba8f38.tar.bz2
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.
Diffstat (limited to 'c/src/lib/libcpu/powerpc/mpc821/clock/clock.c')
-rw-r--r--c/src/lib/libcpu/powerpc/mpc821/clock/clock.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/c/src/lib/libcpu/powerpc/mpc821/clock/clock.c b/c/src/lib/libcpu/powerpc/mpc821/clock/clock.c
index bf11c9bcbb..ce27c426a9 100644
--- a/c/src/lib/libcpu/powerpc/mpc821/clock/clock.c
+++ b/c/src/lib/libcpu/powerpc/mpc821/clock/clock.c
@@ -36,7 +36,6 @@
* $Id$
*/
-#include <bsp.h>
#include <clockdrv.h>
#include <rtems/libio.h>
@@ -74,7 +73,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 +84,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 +130,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 */
m821.piscr &= ~(M821_PISCR_PTE | M821_PISCR_PIE);