summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/mpc860
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-05 16:44:02 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-05 16:44:02 +0000
commit458bd343e24cda7169c75f079705979891c9abc1 (patch)
treea9e584c28211674b28d1e37aec005e0e3a25afa1 /c/src/lib/libcpu/powerpc/mpc860
parentEliminated references to stack checker related #defines. (diff)
downloadrtems-458bd343e24cda7169c75f079705979891c9abc1.tar.bz2
This is another pass at making sure that nothing outside the BSP
unnecessarily uses any variables defined by the BSP. On this sweep, use of BSP_Configuration and Cpu_table was eliminated. A significant part of this modification was the addition of macros to access fields in the RTEMS configuration structures. 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>.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libcpu/powerpc/mpc860/clock/clock.c4
-rw-r--r--c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c5
-rw-r--r--c/src/lib/libcpu/powerpc/mpc860/timer/timer.c6
3 files changed, 5 insertions, 10 deletions
diff --git a/c/src/lib/libcpu/powerpc/mpc860/clock/clock.c b/c/src/lib/libcpu/powerpc/mpc860/clock/clock.c
index 452b939a6d..2d01d786b2 100644
--- a/c/src/lib/libcpu/powerpc/mpc860/clock/clock.c
+++ b/c/src/lib/libcpu/powerpc/mpc860/clock/clock.c
@@ -43,8 +43,6 @@
#include <stdlib.h> /* for atexit() */
#include <mpc860.h>
-extern rtems_cpu_table Cpu_table; /* owned by BSP */
-
volatile rtems_unsigned32 Clock_driver_ticks;
extern volatile m860_t m860;
@@ -75,7 +73,7 @@ void Install_clock(rtems_isr_entry clock_isr)
Clock_driver_ticks = 0;
pit_value = rtems_configuration_get_microseconds_per_tick() /
- Cpu_table.clicks_per_usec;
+ rtems_cpu_configuration_get_clicks_per_usec();
if (pit_value == 0) {
pit_value = 0xffff;
} else {
diff --git a/c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c b/c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c
index 604bb8734a..c713f9ebdc 100644
--- a/c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c
+++ b/c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c
@@ -54,8 +54,6 @@
#define NIFACES 6 /* number of console devices (serial ports) */
-extern rtems_cpu_table Cpu_table; /* owned by BSP */
-
static Buf_t *rxBufList[NIFACES];
static Buf_t *rxBufListTail[NIFACES];
@@ -90,7 +88,8 @@ m860_get_brg_cd (int baud)
int divisor;
int div16 = 0;
- divisor = ((Cpu_table.clock_speed / 16) + (baud / 2)) / baud;
+ divisor = ((rtems_cpu_configuration_get_clock_speed() / 16) +
+ (baud / 2)) / baud;
if (divisor > 4096) {
div16 = 1;
divisor = (divisor + 8) / 16;
diff --git a/c/src/lib/libcpu/powerpc/mpc860/timer/timer.c b/c/src/lib/libcpu/powerpc/mpc860/timer/timer.c
index 732ab565a7..6cfb6fdcbf 100644
--- a/c/src/lib/libcpu/powerpc/mpc860/timer/timer.c
+++ b/c/src/lib/libcpu/powerpc/mpc860/timer/timer.c
@@ -46,8 +46,6 @@
#include <rtems.h>
#include <mpc860.h>
-extern rtems_cpu_table Cpu_table; /* owned by BSP */
-
static volatile rtems_unsigned32 Timer_starting;
static rtems_boolean Timer_driver_Find_average_overhead;
@@ -85,10 +83,10 @@ int Read_timer(void)
return total; /* in XXX microsecond units */
else {
- if ( total < Cpu_table.timer_least_valid ) {
+ if ( total < rtems_cpu_configuration_get_timer_least_valid() ) {
return 0; /* below timer resolution */
}
- return (total - Cpu_table.timer_average_overhead);
+ return (total - rtems_cpu_configuration_get_timer_average_overhead());
}
}