[PATCH 1/4] bsp/leon3: Use interrupt entry for Clock Driver
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Dec 10 13:38:31 UTC 2021
Using rtems_interrupt_entry_install() instead of
rtems_interrupt_handler_install() avoids a dependency on the dynamic memory
allocation.
---
bsps/sparc/leon3/clock/ckinit.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/bsps/sparc/leon3/clock/ckinit.c b/bsps/sparc/leon3/clock/ckinit.c
index 4d30e0fd64..69afb25f3c 100644
--- a/bsps/sparc/leon3/clock/ckinit.c
+++ b/bsps/sparc/leon3/clock/ckinit.c
@@ -133,16 +133,22 @@ static void leon3_tc_do_tick(void)
#define Clock_driver_support_install_isr(isr) \
bsp_clock_handler_install(isr)
+static rtems_interrupt_entry leon3_clock_interrupt_entry;
+
static void bsp_clock_handler_install(rtems_interrupt_handler isr)
{
rtems_status_code sc;
- sc = rtems_interrupt_handler_install(
+ rtems_interrupt_entry_initialize(
+ &leon3_clock_interrupt_entry,
+ isr,
+ NULL,
+ "Clock"
+ );
+ sc = rtems_interrupt_entry_install(
clkirq,
- "Clock",
RTEMS_INTERRUPT_UNIQUE,
- isr,
- NULL
+ &leon3_clock_interrupt_entry
);
if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal(RTEMS_FATAL_SOURCE_BSP, LEON3_FATAL_CLOCK_INITIALIZATION);
--
2.26.2
More information about the devel
mailing list