summaryrefslogtreecommitdiffstats
path: root/bsps/arm/raspberrypi
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2023-03-23 16:53:30 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2024-03-20 16:34:09 +0100
commit1eed6f8bfca86b77174412292ff7807708f4ab3a (patch)
tree54b059527e936d7858de549b18d448a8b6990b57 /bsps/arm/raspberrypi
parentDo not define CONFIGURE_TICKS_PER_TIMESLICE to 0 (diff)
downloadrtems-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 'bsps/arm/raspberrypi')
-rw-r--r--bsps/arm/raspberrypi/clock/clockdrv.c30
1 files changed, 9 insertions, 21 deletions
diff --git a/bsps/arm/raspberrypi/clock/clockdrv.c b/bsps/arm/raspberrypi/clock/clockdrv.c
index 8d220d51ba..bb8490d03a 100644
--- a/bsps/arm/raspberrypi/clock/clockdrv.c
+++ b/bsps/arm/raspberrypi/clock/clockdrv.c
@@ -25,9 +25,6 @@
#include <bsp/raspberrypi.h>
#include <rtems/timecounter.h>
-/* This is defined in ../../../shared/dev/clock/clockimpl.h */
-void Clock_isr(rtems_irq_hdl_param arg);
-
static struct timecounter raspberrypi_tc;
static uint32_t raspberrypi_clock_get_timecount(struct timecounter *tc)
@@ -54,27 +51,18 @@ static void raspberrypi_clock_at_tick(void)
}
static void raspberrypi_clock_handler_install_isr(
- rtems_isr_entry clock_isr
+ rtems_interrupt_handler clock_isr
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
- if (clock_isr != NULL) {
- sc = rtems_interrupt_handler_install(
- BCM2835_IRQ_ID_GPU_TIMER_M3,
- "Clock",
- RTEMS_INTERRUPT_UNIQUE,
- (rtems_interrupt_handler) clock_isr,
- NULL
- );
- } else {
- /* Remove interrupt handler */
- sc = rtems_interrupt_handler_remove(
- BCM2835_IRQ_ID_GPU_TIMER_M3,
- (rtems_interrupt_handler) Clock_isr,
- NULL
- );
- }
+ sc = rtems_interrupt_handler_install(
+ BCM2835_IRQ_ID_GPU_TIMER_M3,
+ "Clock",
+ RTEMS_INTERRUPT_UNIQUE,
+ clock_isr,
+ NULL
+ );
if ( sc != RTEMS_SUCCESSFUL ) {
rtems_fatal_error_occurred(0xdeadbeef);
}
@@ -94,7 +82,7 @@ static void raspberrypi_clock_initialize_hardware(void)
rtems_timecounter_install(&raspberrypi_tc);
}
-#define Clock_driver_support_at_tick() raspberrypi_clock_at_tick()
+#define Clock_driver_support_at_tick(arg) raspberrypi_clock_at_tick()
#define Clock_driver_support_initialize_hardware() raspberrypi_clock_initialize_hardware()