diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-03-23 16:53:30 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2024-03-20 16:34:09 +0100 |
commit | 1eed6f8bfca86b77174412292ff7807708f4ab3a (patch) | |
tree | 54b059527e936d7858de549b18d448a8b6990b57 /bsps/powerpc/mpc55xxevb/clock/clock-config.c | |
parent | Do not define CONFIGURE_TICKS_PER_TIMESLICE to 0 (diff) | |
download | rtems-1eed6f8bfca86b77174412292ff7807708f4ab3a.tar.bz2 |
bsps: Avoid unused argument in clock interrupt
Pass the parameter of the clock interrupt handler to
Clock_driver_support_at_tick() and Clock_driver_timecounter_tick(). This makes
it possible to use the interrupt handler argument in clock drivers.
Use the interrupt handler provided by Clock_driver_support_install_isr() to
avoid local delarations of Clock_isr().
Update #4862.
Diffstat (limited to '')
-rw-r--r-- | bsps/powerpc/mpc55xxevb/clock/clock-config.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/bsps/powerpc/mpc55xxevb/clock/clock-config.c b/bsps/powerpc/mpc55xxevb/clock/clock-config.c index 9a666fc85a..d48367ae1e 100644 --- a/bsps/powerpc/mpc55xxevb/clock/clock-config.c +++ b/bsps/powerpc/mpc55xxevb/clock/clock-config.c @@ -41,8 +41,6 @@ #include <rtems/timecounter.h> -void Clock_isr(void *arg); - static rtems_timecounter_simple mpc55xx_tc; #if defined(MPC55XX_CLOCK_EMIOS_CHANNEL) @@ -75,16 +73,16 @@ static void mpc55xx_tc_at_tick(rtems_timecounter_simple *tc) EMIOS.CH [MPC55XX_CLOCK_EMIOS_CHANNEL].CSR.R = csr.R; } -static void mpc55xx_tc_tick(void) +static void mpc55xx_tc_tick(rtems_timecounter_simple *tc) { rtems_timecounter_simple_upcounter_tick( - &mpc55xx_tc, + tc, mpc55xx_tc_get, mpc55xx_tc_at_tick ); } -static void mpc55xx_clock_handler_install(rtems_isr_entry isr) +static void mpc55xx_clock_handler_install(rtems_interrupt_handler handler) { rtems_status_code sc = RTEMS_SUCCESSFUL; @@ -93,8 +91,8 @@ static void mpc55xx_clock_handler_install(rtems_isr_entry isr) "clock", RTEMS_INTERRUPT_UNIQUE, MPC55XX_INTC_MIN_PRIORITY, - (rtems_interrupt_handler) isr, - NULL + handler, + &mpc55xx_tc ); if (sc != RTEMS_SUCCESSFUL) { bsp_fatal(MPC55XX_FATAL_CLOCK_EMIOS_IRQ_INSTALL); @@ -190,16 +188,16 @@ static void mpc55xx_tc_at_tick(rtems_timecounter_simple *tc) channel->TFLG.R = tflg.R; } -static void mpc55xx_tc_tick(void) +static void mpc55xx_tc_tick(rtems_timecounter_simple *tc) { rtems_timecounter_simple_downcounter_tick( - &mpc55xx_tc, + tc, mpc55xx_tc_get, mpc55xx_tc_at_tick ); } -static void mpc55xx_clock_handler_install(rtems_isr_entry isr) +static void mpc55xx_clock_handler_install(rtems_interrupt_handler handler) { rtems_status_code sc = RTEMS_SUCCESSFUL; @@ -208,8 +206,8 @@ static void mpc55xx_clock_handler_install(rtems_isr_entry isr) "clock", RTEMS_INTERRUPT_UNIQUE, MPC55XX_INTC_MIN_PRIORITY, - (rtems_interrupt_handler) isr, - NULL + handler, + &mpc55xx_tc ); if (sc != RTEMS_SUCCESSFUL) { bsp_fatal(MPC55XX_FATAL_CLOCK_PIT_IRQ_INSTALL); @@ -240,7 +238,7 @@ static void mpc55xx_clock_initialize(void) #endif -#define Clock_driver_timecounter_tick() mpc55xx_tc_tick() +#define Clock_driver_timecounter_tick(arg) mpc55xx_tc_tick(arg) #define Clock_driver_support_initialize_hardware() \ mpc55xx_clock_initialize() #define Clock_driver_support_install_isr(isr) \ |