From 5fdb72a0b36f8338437a8ce1342947d6307a4de0 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sun, 12 Oct 2014 14:09:37 -0500 Subject: no_cpu/no_bsp/clock/ckinit.c: Remove clock major/minor and clean up --- c/src/lib/libbsp/no_cpu/no_bsp/clock/ckinit.c | 49 +++++++++------------------ 1 file changed, 16 insertions(+), 33 deletions(-) (limited to 'c/src/lib/libbsp/no_cpu') 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; } -- cgit v1.2.3