diff options
Diffstat (limited to '')
-rw-r--r-- | bsps/sparc/leon2/clock/ckinit.c | 14 | ||||
-rw-r--r-- | bsps/sparc/leon2/include/bsp.h | 2 | ||||
-rw-r--r-- | bsps/sparc/leon2/include/tm27.h | 24 |
3 files changed, 28 insertions, 12 deletions
diff --git a/bsps/sparc/leon2/clock/ckinit.c b/bsps/sparc/leon2/clock/ckinit.c index ba97894861..8b6ce9a00b 100644 --- a/bsps/sparc/leon2/clock/ckinit.c +++ b/bsps/sparc/leon2/clock/ckinit.c @@ -93,14 +93,14 @@ uint32_t _CPU_Counter_frequency(void) return LEON2_TIMER_1_FREQUENCY; } -/* - * The Real Time Clock Counter Timer uses this trap type. - */ - -#define CLOCK_VECTOR LEON_TRAP_TYPE( LEON_INTERRUPT_TIMER1 ) - #define Clock_driver_support_install_isr( _new ) \ - set_vector( _new, CLOCK_VECTOR, 1 ) + (void) rtems_interrupt_handler_install( \ + LEON_INTERRUPT_TIMER1, \ + "Clock", \ + RTEMS_INTERRUPT_SHARED, \ + _new, \ + NULL \ + ) #define Clock_driver_support_at_tick() leon2_clock_at_tick() diff --git a/bsps/sparc/leon2/include/bsp.h b/bsps/sparc/leon2/include/bsp.h index f97d78ba80..bdd9c1ca70 100644 --- a/bsps/sparc/leon2/include/bsp.h +++ b/bsps/sparc/leon2/include/bsp.h @@ -52,6 +52,8 @@ extern "C" { /* SPARC CPU variant: LEON2 */ #define LEON2 1 +#define BSP_FEATURE_IRQ_EXTENSION + /* * BSP provides its own Idle thread body */ diff --git a/bsps/sparc/leon2/include/tm27.h b/bsps/sparc/leon2/include/tm27.h index 7b1afe96af..8d29607c86 100644 --- a/bsps/sparc/leon2/include/tm27.h +++ b/bsps/sparc/leon2/include/tm27.h @@ -57,14 +57,28 @@ #else /* use a regular asynchronous trap */ #define TEST_INTERRUPT_SOURCE LEON_INTERRUPT_EXTERNAL_1 -#define TEST_VECTOR LEON_TRAP_TYPE( TEST_INTERRUPT_SOURCE ) #define TEST_INTERRUPT_SOURCE2 LEON_INTERRUPT_EXTERNAL_1+1 -#define TEST_VECTOR2 LEON_TRAP_TYPE( TEST_INTERRUPT_SOURCE2 ) #define MUST_WAIT_FOR_INTERRUPT 1 -#define Install_tm27_vector( handler ) \ - set_vector( (handler), TEST_VECTOR, 1 ); \ - set_vector( (handler), TEST_VECTOR2, 1 ); +static inline void Install_tm27_vector( + void ( *handler )( rtems_vector_number ) +) +{ + (void) rtems_interrupt_handler_install( + TEST_INTERRUPT_SOURCE, + "tm27 low", + RTEMS_INTERRUPT_SHARED, + (rtems_interrupt_handler) handler, + NULL + ); + (void) rtems_interrupt_handler_install( + TEST_INTERRUPT_SOURCE2, + "tm27 high", + RTEMS_INTERRUPT_SHARED, + (rtems_interrupt_handler) handler, + NULL + ); +} #define Cause_tm27_intr() \ do { \ |