diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-11-04 18:05:09 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-11-04 18:05:09 +0000 |
commit | f817b0283cce904d0bcb48cf9e641c2b40ba8f38 (patch) | |
tree | f8d686387ff9cf0639e38887ad23aef46e57db94 /c/src/lib/libcpu/powerpc/ppc403/clock/clock.c | |
parent | Added first stab at mkgnatnewlib. (diff) | |
download | rtems-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/ppc403/clock/clock.c')
-rw-r--r-- | c/src/lib/libcpu/powerpc/ppc403/clock/clock.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c b/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c index 99b538dcd3..dfcbea5535 100644 --- a/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c +++ b/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c @@ -37,7 +37,7 @@ * $Id$ */ -#include <bsp.h> +#include <rtems.h> #include <clockdrv.h> #include <rtems/libio.h> @@ -164,11 +164,10 @@ void Install_clock(rtems_isr_entry clock_isr) else if ((pvr & 0xff00) == 0x0100) /* 403GB */ auto_restart = 1; - pit_value = BSP_Configuration.microseconds_per_tick * + pit_value = rtems_configuration_get_microseconds_per_tick() * Cpu_table.clicks_per_usec; - if (BSP_Configuration.ticks_per_timeslice) - { + if ( rtems_configuration_get_ticks_per_timeslice() ) { register rtems_unsigned32 tcr; /* @@ -218,8 +217,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() ) { register rtems_unsigned32 tcr; asm volatile ("mfspr %0, 0x3da" : "=r" ((tcr))); /* TCR */ |