s3c24xx shared: Clock driver clean up and ISR Handler Prototype Correction.

This commit is contained in:
Joel Sherrill
2012-04-19 13:16:33 -05:00
parent abb52ce597
commit 1a3cbfba52

View File

@@ -6,37 +6,28 @@
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at * found in the file LICENSE in this distribution or at
*
* http://www.rtems.com/license/LICENSE. * http://www.rtems.com/license/LICENSE.
* */
*
* $Id$
*/
#include <rtems.h> #include <rtems.h>
#include <bsp/irq.h> #include <bsp/irq.h>
#include <bsp.h> #include <bsp.h>
#include <s3c24xx.h> #include <s3c24xx.h>
/* this is defined in ../../../shared/clockdrv_shell.h */ void Clock_isr(rtems_irq_hdl_param arg);
rtems_isr Clock_isr(rtems_vector_number vector);
static void clock_isr_on(const rtems_irq_connect_data *unused); static void clock_isr_on(const rtems_irq_connect_data *unused);
static void clock_isr_off(const rtems_irq_connect_data *unused); static void clock_isr_off(const rtems_irq_connect_data *unused);
static int clock_isr_is_on(const rtems_irq_connect_data *irq); static int clock_isr_is_on(const rtems_irq_connect_data *irq);
/* Replace the first value with the clock's interrupt name. */ rtems_irq_connect_data clock_isr_data = {
rtems_irq_connect_data clock_isr_data = {BSP_INT_TIMER4, .name = BSP_INT_TIMER4,
(rtems_irq_hdl)Clock_isr, .hdl = Clock_isr,
NULL, .handle = NULL,
clock_isr_on, .on = clock_isr_on,
clock_isr_off, .off = clock_isr_off,
clock_isr_is_on .isOn = clock_isr_is_on,
}; };
/* If you follow the code, this is never used, so any value
* should work
*/
#define CLOCK_VECTOR 0
/** /**
* Return the nanoseconds since last tick * Return the nanoseconds since last tick
*/ */
@@ -55,7 +46,7 @@ uint32_t clock_driver_get_nanoseconds_since_last_tick(void)
*/ */
#define Clock_driver_support_at_tick() \ #define Clock_driver_support_at_tick() \
do { \ do { \
ClearPending(BIT_TIMER4); \ ClearPending(BIT_TIMER4); \
} while(0) } while(0)
@@ -118,7 +109,6 @@ uint32_t clock_driver_get_nanoseconds_since_last_tick(void)
*/ */
static void clock_isr_on(const rtems_irq_connect_data *unused) static void clock_isr_on(const rtems_irq_connect_data *unused)
{ {
return;
} }
/** /**
@@ -139,9 +129,7 @@ static void clock_isr_off(const rtems_irq_connect_data *unused)
*/ */
static int clock_isr_is_on(const rtems_irq_connect_data *irq) static int clock_isr_is_on(const rtems_irq_connect_data *irq)
{ {
return 1;
} }
/* Make sure to include this, and only at the end of the file */ /* Make sure to include this, and only at the end of the file */
#include "../../../../libbsp/shared/clockdrv_shell.h" #include "../../../../libbsp/shared/clockdrv_shell.h"