forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
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.
|
||||
|
||||
2000-09-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* mpc505/timer/Makefile.am, mpc505/vectors/Makefile.am,
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -19,8 +19,9 @@
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <rtems.h>
|
||||
#include <libcpu/cpu.h>
|
||||
#include <bsp.h>
|
||||
/* #include <bsp.h> */
|
||||
|
||||
rtems_unsigned64 Timer_driver_Start_time;
|
||||
|
||||
@@ -60,6 +61,9 @@ void Timer_initialize()
|
||||
/*
|
||||
* Read_timer
|
||||
*/
|
||||
|
||||
extern int BSP_Convert_decrementer( unsigned32 );
|
||||
|
||||
int Read_timer()
|
||||
{
|
||||
rtems_unsigned64 total64;
|
||||
|
||||
Reference in New Issue
Block a user