diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2012-04-19 13:16:33 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2012-04-19 13:16:33 -0500 |
commit | 1a3cbfba524fcafb52e74b4372023428acb86130 (patch) | |
tree | c447eb5f7b079937d228abfdd4511485306eb98f /c/src/lib/libcpu/arm | |
parent | pxa255 shared: Clock driver clean up and ISR Handler Prototype Correction. (diff) | |
download | rtems-1a3cbfba524fcafb52e74b4372023428acb86130.tar.bz2 |
s3c24xx shared: Clock driver clean up and ISR Handler Prototype Correction.
Diffstat (limited to 'c/src/lib/libcpu/arm')
-rw-r--r-- | c/src/lib/libcpu/arm/s3c24xx/clock/clockdrv.c | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/c/src/lib/libcpu/arm/s3c24xx/clock/clockdrv.c b/c/src/lib/libcpu/arm/s3c24xx/clock/clockdrv.c index 8a05c6bb1a..9c799a24a4 100644 --- a/c/src/lib/libcpu/arm/s3c24xx/clock/clockdrv.c +++ b/c/src/lib/libcpu/arm/s3c24xx/clock/clockdrv.c @@ -6,37 +6,28 @@ * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at - * * http://www.rtems.com/license/LICENSE. - * - * - * $Id$ -*/ + */ + #include <rtems.h> #include <bsp/irq.h> #include <bsp.h> #include <s3c24xx.h> -/* this is defined in ../../../shared/clockdrv_shell.h */ -rtems_isr Clock_isr(rtems_vector_number vector); +void Clock_isr(rtems_irq_hdl_param arg); static void clock_isr_on(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); -/* Replace the first value with the clock's interrupt name. */ -rtems_irq_connect_data clock_isr_data = {BSP_INT_TIMER4, - (rtems_irq_hdl)Clock_isr, - NULL, - clock_isr_on, - clock_isr_off, - clock_isr_is_on +rtems_irq_connect_data clock_isr_data = { + .name = BSP_INT_TIMER4, + .hdl = Clock_isr, + .handle = NULL, + .on = clock_isr_on, + .off = clock_isr_off, + .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 */ @@ -55,7 +46,7 @@ uint32_t clock_driver_get_nanoseconds_since_last_tick(void) */ #define Clock_driver_support_at_tick() \ do { \ - ClearPending(BIT_TIMER4); \ + ClearPending(BIT_TIMER4); \ } 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) { - 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) { - return 1; } - /* Make sure to include this, and only at the end of the file */ #include "../../../../libbsp/shared/clockdrv_shell.h" |