From 5981c8ca9fcb6aa4b4c614268c9348b910cdba36 Mon Sep 17 00:00:00 2001 From: Jiri Gaisler Date: Fri, 18 Jan 2019 11:29:08 +0100 Subject: grlib: use rtems_interrupt_handler_install() Update #3678. --- bsps/shared/grlib/ascs/grascs.c | 6 ++++-- bsps/shared/grlib/can/satcan.c | 6 ++++-- bsps/shared/grlib/drvmgr/ambapp_bus_grlib.c | 5 +++-- bsps/shared/grlib/slink/grslink.c | 6 ++++-- 4 files changed, 15 insertions(+), 8 deletions(-) (limited to 'bsps/shared/grlib') diff --git a/bsps/shared/grlib/ascs/grascs.c b/bsps/shared/grlib/ascs/grascs.c index 1d9541ce85..030faaa44c 100644 --- a/bsps/shared/grlib/ascs/grascs.c +++ b/bsps/shared/grlib/ascs/grascs.c @@ -130,7 +130,7 @@ static int ASCS_get_sysfreq(void) { appropriate bits in the core's STS register and releases the associated semaphore */ -static rtems_isr ASCS_irqhandler(rtems_vector_number v) { +static rtems_isr ASCS_irqhandler(void *v) { if(cfg->regs->sts & GRASCS_STS_TCDONE) { /* Clear TC done bit */ @@ -271,7 +271,9 @@ int ASCS_init(void) { GRASCS_CMD_TCDONE | GRASCS_CMD_TMDONE; /* Register interrupt routine */ - set_vector(ASCS_irqhandler,irq+0x10,2); + rtems_interrupt_handler_install(irq, "grascs", + RTEMS_INTERRUPT_SHARED, + ASCS_irqhandler, NULL); return 0; diff --git a/bsps/shared/grlib/can/satcan.c b/bsps/shared/grlib/can/satcan.c index c6d58aaed4..ff54128332 100644 --- a/bsps/shared/grlib/can/satcan.c +++ b/bsps/shared/grlib/can/satcan.c @@ -152,7 +152,7 @@ static void almalloc(unsigned char **alptr, void **ptr, int sz) *alptr = (unsigned char *) (((int)*ptr+sz) & ~(sz-1)); } -static rtems_isr satcan_interrupt_handler(rtems_vector_number v) +static rtems_isr satcan_interrupt_handler(void *v) { unsigned int irq; unsigned int fifo; @@ -665,7 +665,9 @@ static rtems_device_driver satcan_initialize(rtems_device_major_number major, rt priv->dmamode = SATCAN_DMA_MODE_SYSTEM; /* Register interrupt handler */ - set_vector(satcan_interrupt_handler, d.irq+0x10, 2); + rtems_interrupt_handler_install(d.irq, "satcan", + RTEMS_INTERRUPT_SHARED, + satcan_interrupt_handler, NULL); return RTEMS_SUCCESSFUL; } diff --git a/bsps/shared/grlib/drvmgr/ambapp_bus_grlib.c b/bsps/shared/grlib/drvmgr/ambapp_bus_grlib.c index 9e8c37daf2..fbbe5fa9bb 100644 --- a/bsps/shared/grlib/drvmgr/ambapp_bus_grlib.c +++ b/bsps/shared/grlib/drvmgr/ambapp_bus_grlib.c @@ -188,7 +188,8 @@ static int ambapp_grlib_int_register void *arg ) { - return BSP_shared_interrupt_register(irq, info, isr, arg); + return rtems_interrupt_handler_install(irq, info, + RTEMS_INTERRUPT_SHARED, isr, arg); } static int ambapp_grlib_int_unregister @@ -199,7 +200,7 @@ static int ambapp_grlib_int_unregister void *arg ) { - return BSP_shared_interrupt_unregister(irq, isr, arg); + return rtems_interrupt_handler_remove(irq, isr, arg); } static int ambapp_grlib_int_clear diff --git a/bsps/shared/grlib/slink/grslink.c b/bsps/shared/grlib/slink/grslink.c index 5a3b5b5ea6..8cf532c14f 100644 --- a/bsps/shared/grlib/slink/grslink.c +++ b/bsps/shared/grlib/slink/grslink.c @@ -236,7 +236,7 @@ static int SLINK_getsysfreq(void) * variable. SLAVE-WORD-SEND transfers are placed in the IO card's receive * queue. */ -static rtems_isr SLINK_interrupt_handler(rtems_vector_number v) +static rtems_isr SLINK_interrupt_handler(void *v) { unsigned int sts; unsigned int wrd; @@ -407,7 +407,9 @@ int SLINK_init(unsigned int nullwrd, int parity, int qsize, cfg->slink_seq_change = sequence_callback; /* Set-up IRQ handling */ - set_vector(SLINK_interrupt_handler,irq+0x10,2); + rtems_interrupt_handler_install(irq, "slink", + RTEMS_INTERRUPT_SHARED, + SLINK_interrupt_handler, NULL); return 0; -- cgit v1.2.3