bsp/tms570: Add TMS570_FATAL_RTI_IRQ_INSTALL

Update #4982.
This commit is contained in:
Sebastian Huber
2024-04-23 21:06:52 +02:00
committed by Amar Takhar
parent 575ec7ed39
commit cb43ee6969
2 changed files with 7 additions and 11 deletions

View File

@@ -41,6 +41,7 @@
*/ */
#include <bsp.h> #include <bsp.h>
#include <bsp/fatal.h>
#include <bsp/irq.h> #include <bsp/irq.h>
#include <bsp/tms570.h> #include <bsp/tms570.h>
#include <rtems/timecounter.h> #include <rtems/timecounter.h>
@@ -117,19 +118,11 @@ static void tms570_clock_driver_support_at_tick(volatile tms570_rti_t *rti)
rti->INTFLAG = TMS570_RTI_INTFLAG_INT0; rti->INTFLAG = TMS570_RTI_INTFLAG_INT0;
} }
/**
* @brief registers RTI interrupt handler
*
* @param[in] Clock_isr new ISR handler
* @param[in] Old_ticker old ISR handler (unused and type broken)
*
* @retval Void
*/
static void tms570_clock_driver_support_install_isr( static void tms570_clock_driver_support_install_isr(
rtems_interrupt_handler handler rtems_interrupt_handler handler
) )
{ {
rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_status_code sc;
sc = rtems_interrupt_handler_install( sc = rtems_interrupt_handler_install(
TMS570_IRQ_TIMER_0, TMS570_IRQ_TIMER_0,
@@ -138,8 +131,8 @@ static void tms570_clock_driver_support_install_isr(
handler, handler,
RTEMS_DEVOLATILE(tms570_rti_t *, &TMS570_RTI) RTEMS_DEVOLATILE(tms570_rti_t *, &TMS570_RTI)
); );
if ( sc != RTEMS_SUCCESSFUL ) { if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred(0xdeadbeef); bsp_fatal(TMS570_FATAL_RTI_IRQ_INSTALL);
} }
} }

View File

@@ -217,6 +217,9 @@ typedef enum {
/* Xilinx fatal codes */ /* Xilinx fatal codes */
XIL_FATAL_TTC_IRQ_INSTALL = BSP_FATAL_CODE_BLOCK(17), XIL_FATAL_TTC_IRQ_INSTALL = BSP_FATAL_CODE_BLOCK(17),
/* TMS570 fatal codes */
TMS570_FATAL_RTI_IRQ_INSTALL = BSP_FATAL_CODE_BLOCK(18),
} bsp_fatal_code; } bsp_fatal_code;
RTEMS_NO_RETURN static inline void RTEMS_NO_RETURN static inline void