[PATCH] bsps: Use interrupt entry in clock driver
Sebastian Huber
sebastian.huber at embedded-brains.de
Tue Apr 23 19:08:37 UTC 2024
This avoids a dependency on memory allocations.
---
bsps/shared/dev/clock/arm-generic-timer.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/bsps/shared/dev/clock/arm-generic-timer.c b/bsps/shared/dev/clock/arm-generic-timer.c
index ba159f6833..44cf1ebe6c 100644
--- a/bsps/shared/dev/clock/arm-generic-timer.c
+++ b/bsps/shared/dev/clock/arm-generic-timer.c
@@ -68,16 +68,22 @@ static void arm_gt_clock_at_tick(arm_gt_clock_context *ctx)
#endif /* ARM_GENERIC_TIMER_UNMASK_AT_TICK */
}
+static rtems_interrupt_entry arm_gt_interrupt_entry;
+
static void arm_gt_clock_handler_install(rtems_interrupt_handler handler)
{
rtems_status_code sc;
- sc = rtems_interrupt_handler_install(
+ rtems_interrupt_entry_initialize(
+ &arm_gt_interrupt_entry,
+ handler,
+ &arm_gt_clock_instance,
+ "Clock"
+ );
+ sc = rtems_interrupt_entry_install(
arm_gt_clock_instance.irq,
- "Clock",
RTEMS_INTERRUPT_UNIQUE,
- handler,
- &arm_gt_clock_instance
+ &arm_gt_interrupt_entry
);
if (sc != RTEMS_SUCCESSFUL) {
bsp_fatal(BSP_ARM_FATAL_GENERIC_TIMER_CLOCK_IRQ_INSTALL);
--
2.35.3
More information about the devel
mailing list