summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/no_cpu/no_bsp/clock/ckinit.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-12 14:09:37 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-13 10:33:31 -0500
commit5fdb72a0b36f8338437a8ce1342947d6307a4de0 (patch)
tree2d7621cd4f90247e9cbdb2420975158af01c357b /c/src/lib/libbsp/no_cpu/no_bsp/clock/ckinit.c
parentm68k/mrm332/clock/ckinit.c: Remove clock major/minor and clean up (diff)
downloadrtems-5fdb72a0b36f8338437a8ce1342947d6307a4de0.tar.bz2
no_cpu/no_bsp/clock/ckinit.c: Remove clock major/minor and clean up
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/no_cpu/no_bsp/clock/ckinit.c49
1 files changed, 16 insertions, 33 deletions
diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/clock/ckinit.c b/c/src/lib/libbsp/no_cpu/no_bsp/clock/ckinit.c
index 5badbe159d..fbfe541e27 100644
--- a/c/src/lib/libbsp/no_cpu/no_bsp/clock/ckinit.c
+++ b/c/src/lib/libbsp/no_cpu/no_bsp/clock/ckinit.c
@@ -1,8 +1,12 @@
-/* ckinit.c
- *
+/*
* This file provides a template for the clock device driver initialization.
*
- * COPYRIGHT (c) 1989-1999.
+ * If possible, please use the clockdrv_shell.h method for instantiating
+ * a clock driver.
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -22,14 +26,12 @@ rtems_isr Clock_isr( rtems_vector_number vector );
* The interrupt vector number associated with the clock tick device
* driver.
*/
-
#define CLOCK_VECTOR 4
/*
* Clock_driver_ticks is a monotonically increasing counter of the
* number of clock ticks since the driver was initialized.
*/
-
volatile uint32_t Clock_driver_ticks;
/*
@@ -39,20 +41,11 @@ volatile uint32_t Clock_driver_ticks;
* length of time between the user configured microseconds per tick
* has passed.
*/
-
uint32_t Clock_isrs; /* ISRs until next tick */
/*
- * These are set by clock driver during its init
- */
-
-rtems_device_major_number rtems_clock_major = ~0;
-rtems_device_minor_number rtems_clock_minor;
-
-/*
* The previous ISR on this clock tick interrupt vector.
*/
-
rtems_isr_entry Old_ticker;
void Clock_exit( void );
@@ -60,19 +53,18 @@ void Clock_exit( void );
/*
* Isr Handler
*/
-
-rtems_isr Clock_isr(
+static rtems_isr Clock_isr(
rtems_vector_number vector
)
{
-/*
- * bump the number of clock driver ticks since initialization
- *
- * determine if it is time to announce the passing of tick as configured
- * to RTEMS through the rtems_clock_tick directive
- *
- * perform any timer dependent tasks
- */
+ /*
+ * bump the number of clock driver ticks since initialization
+ *
+ * determine if it is time to announce the passing of tick as configured
+ * to RTEMS through the rtems_clock_tick directive
+ *
+ * perform any timer dependent tasks
+ */
}
/*
@@ -81,7 +73,6 @@ rtems_isr Clock_isr(
* Install a clock tick handler and reprograms the chip. This
* is used to initially establish the clock tick.
*/
-
void Install_clock(
rtems_isr_entry clock_isr
)
@@ -123,7 +114,6 @@ void Clock_exit( void )
*
* Device driver entry point for clock tick driver initialization.
*/
-
rtems_device_driver Clock_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -132,13 +122,6 @@ rtems_device_driver Clock_initialize(
{
Install_clock( Clock_isr );
- /*
- * make major/minor avail to others such as shared memory driver
- */
-
- rtems_clock_major = major;
- rtems_clock_minor = minor;
-
return RTEMS_SUCCESSFUL;
}