summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/mpc8xx
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-11-28 21:45:06 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-11-28 21:45:06 +0000
commitc4cc81993a324a6416cb92f8c1b78ff501654dbf (patch)
tree190fbb3656e871c93f4d4fd5c8ff11a81262c0c5 /c/src/lib/libcpu/powerpc/mpc8xx
parent2007-11-28 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-c4cc81993a324a6416cb92f8c1b78ff501654dbf.tar.bz2
2007-11-28 Joel Sherrill <joel.sherrill@OARcorp.com>
* mpc5xx/clock/clock.c, mpc5xx/timer/timer.c, mpc8260/clock/clock.c, mpc8260/cpm/brg.c, mpc8260/timer/timer.c, mpc8xx/clock/clock.c, mpc8xx/console-generic/console-generic.c, mpc8xx/timer/timer.c, new-exceptions/raw_exception.c, old-exceptions/cpu.c, ppc403/clock/clock.c, ppc403/console/console.c, ppc403/console/console.c.polled, ppc403/console/console405.c, ppc403/ictrl/ictrl.c, ppc403/irq/ictrl.c, ppc403/timer/timer.c, ppc403/tty_drv/tty_drv.c: Eliminate PowerPC specific elements from the CPU Table. They have been replaced with variables named bsp_XXX as needed.
Diffstat (limited to 'c/src/lib/libcpu/powerpc/mpc8xx')
-rw-r--r--c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c11
-rw-r--r--c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c6
-rw-r--r--c/src/lib/libcpu/powerpc/mpc8xx/timer/timer.c16
3 files changed, 15 insertions, 18 deletions
diff --git a/c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c b/c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c
index 9dbfafcade..30cf071615 100644
--- a/c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c
+++ b/c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c
@@ -25,7 +25,7 @@
*
* Derived from c/src/lib/libcpu/hppa1_1/clock/clock.c:
*
- * COPYRIGHT (c) 1989-1998.
+ * COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -73,12 +73,15 @@ void clockOn(void* unused)
uint32_t pit_value;
uint32_t mf_value;
rtems_boolean force_prescaler = FALSE;
- if (rtems_cpu_configuration_get_clicks_per_usec() == 0) {
+ extern uint32_t bsp_clicks_per_usec;
+ extern uint32_t bsp_clock_speed;
+
+ if (bsp_clicks_per_usec == 0) {
/*
* oscclk is too low for PIT, compute extclk and derive PIT from there
*/
mf_value = m8xx.plprcr >> 20;
- pit_value = (_CPU_Table.clock_speed
+ pit_value = (bsp_clock_speed
/ (mf_value+1)
/ 1000
/ 4
@@ -89,7 +92,7 @@ void clockOn(void* unused)
}
else {
pit_value = (rtems_configuration_get_microseconds_per_tick() *
- rtems_cpu_configuration_get_clicks_per_usec());
+ bsp_clicks_per_usec);
m8xx.sccr &= ~(1<<23);
}
diff --git a/c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c b/c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c
index dc424e251d..11de399c13 100644
--- a/c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c
+++ b/c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c
@@ -30,7 +30,7 @@
* Saskatoon, Saskatchewan, CANADA
* eric@skatter.usask.ca
*
- * COPYRIGHT (c) 1989-1998.
+ * COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* Modifications by Darlene Stewart <Darlene.Stewart@iit.nrc.ca>
@@ -57,7 +57,6 @@
#include <rtems/bspIo.h> /* for printk */
int BSP_irq_enabled_at_cpm(const rtems_irq_number irqLine);
-extern rtems_cpu_table Cpu_table;
/* BSP supplied routine */
extern int mbx8xx_console_get_configuration();
@@ -111,8 +110,9 @@ m8xx_get_brg_cd (int baud)
{
int divisor;
int div16 = 0;
+ extern uint32_t bsp_clock_speed;
- divisor = ((Cpu_table.clock_speed / 16) + (baud / 2)) / baud;
+ divisor = ((bsp_clock_speed / 16) + (baud / 2)) / baud;
if (divisor > 4096) {
div16 = 1;
divisor = (divisor + 8) / 16;
diff --git a/c/src/lib/libcpu/powerpc/mpc8xx/timer/timer.c b/c/src/lib/libcpu/powerpc/mpc8xx/timer/timer.c
index 627927bc60..87d1486695 100644
--- a/c/src/lib/libcpu/powerpc/mpc8xx/timer/timer.c
+++ b/c/src/lib/libcpu/powerpc/mpc8xx/timer/timer.c
@@ -32,7 +32,7 @@
*
* Derived from c/src/lib/libcpu/hppa1_1/timer/timer.c:
*
- * COPYRIGHT (c) 1989-1998.
+ * COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -69,18 +69,12 @@ void Timer_initialize(void)
Timer_starting = get_itimer();
}
-#ifndef rtems_cpu_configuration_get_timer_least_valid
-#define rtems_cpu_configuration_get_timer_least_valid() 0
-#endif
-
-#ifndef rtems_cpu_configuration_get_timer_average_overhead
-#define rtems_cpu_configuration_get_timer_average_overhead() 0
-#endif
-
int Read_timer(void)
{
uint32_t clicks;
uint32_t total;
+ extern uint32_t bsp_timer_least_valid;
+ extern uint32_t bsp_timer_average_overhead;
clicks = get_itimer();
@@ -90,10 +84,10 @@ int Read_timer(void)
return total; /* in XXX microsecond units */
else {
- if ( total < rtems_cpu_configuration_get_timer_least_valid() ) {
+ if ( total < bsp_timer_least_valid ) {
return 0; /* below timer resolution */
}
- return (total - rtems_cpu_configuration_get_timer_average_overhead());
+ return (total - bsp_timer_average_overhead);
}
}