summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/i386ex/clock/ckinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/i386/i386ex/clock/ckinit.c')
-rw-r--r--c/src/lib/libbsp/i386/i386ex/clock/ckinit.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/c/src/lib/libbsp/i386/i386ex/clock/ckinit.c b/c/src/lib/libbsp/i386/i386ex/clock/ckinit.c
index 0bece0732a..20d50a35e0 100644
--- a/c/src/lib/libbsp/i386/i386ex/clock/ckinit.c
+++ b/c/src/lib/libbsp/i386/i386ex/clock/ckinit.c
@@ -41,7 +41,7 @@ void Clock_exit( void );
/*
* These are set by clock driver during its init
*/
-
+
rtems_device_major_number rtems_clock_major = ~0;
rtems_device_major_number rtems_clock_minor = 0;
@@ -91,28 +91,28 @@ rtems_device_driver Clock_initialize(
{
unsigned timer_counter_init_value;
unsigned char clock_lsb, clock_msb;
-
+
Clock_driver_ticks = 0;
- Clock_isrs =
- Clock_initial_isr_value =
+ Clock_isrs =
+ Clock_initial_isr_value =
BSP_Configuration.microseconds_per_tick / 1000; /* ticks per clock_isr */
-
+
/*
* configure the counter timer ( should be based on microsecs/tick )
* NB. The divisor(Clock_isrs) resolves the is the same number that appears in confdefs.h
* when setting the microseconds_per_tick value.
*/
ClockOff ( &clockIrqData );
-
+
timer_counter_init_value = BSP_Configuration.microseconds_per_tick / Clock_isrs;
clock_lsb = (unsigned char)timer_counter_init_value;
clock_msb = timer_counter_init_value >> 8;
-
- outport_byte ( TMRCON , 0x34 );
+
+ outport_byte ( TMRCON , 0x34 );
outport_byte ( TMR0 , clock_lsb ); /* load LSB first */
outport_byte ( TMR0 , clock_msb ); /* then MSB */
-
+
if (!BSP_install_rtems_irq_handler (&clockIrqData)) {
printk("Unable to initialize system clock\n");
rtems_fatal_error_occurred(1);
@@ -121,10 +121,10 @@ rtems_device_driver Clock_initialize(
/*
* make major/minor avail to others such as shared memory driver
*/
-
+
rtems_clock_major = major;
rtems_clock_minor = minor;
-
+
return RTEMS_SUCCESSFUL;
}
@@ -135,15 +135,15 @@ rtems_device_driver Clock_control(
)
{
rtems_libio_ioctl_args_t *args = pargp;
-
+
if (args == 0)
goto done;
-
+
/*
* This is hokey, but until we get a defined interface
* to do this, it will just be this simple...
*/
-
+
if (args->command == rtems_build_name('I', 'S', 'R', ' '))
{
Clock_isr();
@@ -159,13 +159,13 @@ rtems_device_driver Clock_control(
printk("Clock installed AGAIN\n");
#endif
}
-
+
done:
return RTEMS_SUCCESSFUL;
}
void Clock_exit()
{
- ClockOff(&clockIrqData);
+ ClockOff(&clockIrqData);
BSP_remove_rtems_irq_handler (&clockIrqData);
}