bsp/leon3: Use interrupt entry for Clock Driver

Using rtems_interrupt_entry_install() instead of
rtems_interrupt_handler_install() avoids a dependency on the dynamic memory
allocation.
This commit is contained in:
Sebastian Huber
2021-07-01 08:26:47 +02:00
parent 2d75d5db4f
commit 6318154199

View File

@@ -133,16 +133,22 @@ static void leon3_tc_do_tick(void)
#define Clock_driver_support_install_isr(isr) \ #define Clock_driver_support_install_isr(isr) \
bsp_clock_handler_install(isr) bsp_clock_handler_install(isr)
static rtems_interrupt_entry leon3_clock_interrupt_entry;
static void bsp_clock_handler_install(rtems_interrupt_handler isr) static void bsp_clock_handler_install(rtems_interrupt_handler isr)
{ {
rtems_status_code sc; rtems_status_code sc;
sc = rtems_interrupt_handler_install( rtems_interrupt_entry_initialize(
clkirq, &leon3_clock_interrupt_entry,
"Clock",
RTEMS_INTERRUPT_UNIQUE,
isr, isr,
NULL NULL,
"Clock"
);
sc = rtems_interrupt_entry_install(
clkirq,
RTEMS_INTERRUPT_UNIQUE,
&leon3_clock_interrupt_entry
); );
if (sc != RTEMS_SUCCESSFUL) { if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal(RTEMS_FATAL_SOURCE_BSP, LEON3_FATAL_CLOCK_INITIALIZATION); rtems_fatal(RTEMS_FATAL_SOURCE_BSP, LEON3_FATAL_CLOCK_INITIALIZATION);