summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/mpc6xx/clock
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-10-18 15:21:35 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-10-18 15:21:35 +0000
commit8e13ca61cfde65896457384af35054b3f9ee6835 (patch)
tree0bd680f968fdb1539480dd692e967c2e8667fad3 /c/src/lib/libcpu/powerpc/mpc6xx/clock
parent2000-10-18 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-8e13ca61cfde65896457384af35054b3f9ee6835.tar.bz2
2000-10-18 Joel Sherrill <joel@OARcorp.com>
* mpc6xx/clock/c_clock.c, mpc6xx/clock/c_clock.h: Removed use of bsp.h and replaced it with use of proper interfaces or explicit externs of required functions and data. * mpc6xx/timer/timer.c: Ditto.
Diffstat (limited to 'c/src/lib/libcpu/powerpc/mpc6xx/clock')
-rw-r--r--c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c5
-rw-r--r--c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.h25
2 files changed, 26 insertions, 4 deletions
diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c b/c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c
index 988215fa26..8281ec0a57 100644
--- a/c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c
+++ b/c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c
@@ -26,6 +26,7 @@
#include <assert.h>
#include <libcpu/cpu.h>
#include <libcpu/c_clock.h>
+#include <bspIo.h> /* for printk() */
/*
* Clock ticks since initialization
@@ -140,7 +141,7 @@ rtems_device_driver Clock_initialize(
)
{
Clock_Decrementer_value = (BSP_bus_frequency/BSP_time_base_divisor)*
- (BSP_Configuration.microseconds_per_tick/1000);
+ (rtems_configuration_get_microseconds_per_tick()/1000);
if (!BSP_connect_clock_handler ()) {
printk("Unable to initialize system clock\n");
@@ -182,7 +183,7 @@ rtems_device_driver Clock_control(
goto done;
Clock_Decrementer_value = (BSP_bus_frequency/BSP_time_base_divisor)*
- (BSP_Configuration.microseconds_per_tick/1000);
+ (rtems_configuration_get_microseconds_per_tick()/1000);
if (args->command == rtems_build_name('I', 'S', 'R', ' '))
clockIsr();
diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.h b/c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.h
index 237273f6f9..bfb7242c5e 100644
--- a/c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.h
+++ b/c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.h
@@ -24,16 +24,37 @@
#define _LIB_LIBCPU_C_CLOCK_H
#include <rtems.h>
-#include <bsp.h>
+/* #include <bsp.h> */
/*
- * Theses functions and variables represent the API exported by the CPU to the BSP
+ * These functions and variables represent the API exported by the
+ * CPU to the BSP.
*/
+
extern void clockOff (void* unused);
extern void clockOn (void* unused);
extern void clockIsr (void);
extern int clockIsOn (void* unused);
+/*
+ * These functions and variables represent the assumptions of this
+ * driver on the BSP.
+ */
+
+extern int BSP_disconnect_clock_handler (void);
+/*
+ * PCI Bus Frequency
+ */
+extern unsigned int BSP_bus_frequency;
+/*
+ * processor clock frequency
+ */
+extern unsigned int BSP_processor_frequency;
+/*
+ * Time base divisior (how many tick for 1 second).
+ */
+extern unsigned int BSP_time_base_divisor;
+
#endif