[PATCH 33/54] no_cpu/no_bsp/clock/ckinit.c: Remove clock major/minor and clean up
Joel Sherrill
joel.sherrill at oarcorp.com
Mon Oct 13 15:37:17 UTC 2014
---
c/src/lib/libbsp/no_cpu/no_bsp/clock/ckinit.c | 49 +++++++++------------------
1 file 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 5badbe1..fbfe541 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;
}
--
1.9.3
More information about the devel
mailing list