Skip to content

Commit

Permalink
[nrf fromtree] drivers: mbox: nrf_vevif_task_rx: align to direct IRQs
Browse files Browse the repository at this point in the history
Allow using direct IRQs (which are obligatory when buiding
with `CONFIG_GEN_SW_ISR_TABLE=n`).

Signed-off-by: Marcin Szymczyk <[email protected]>
(cherry picked from commit a555838)
  • Loading branch information
masz-nordic authored and rlubos committed Oct 16, 2024
1 parent 3013df9 commit 073a895
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions drivers/mbox/mbox_nrf_vevif_task_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,25 @@ static const struct mbox_driver_api vevif_task_rx_driver_api = {
.set_enabled = vevif_task_rx_set_enabled,
};

#if defined(CONFIG_GEN_SW_ISR_TABLE)
#define VEVIF_IRQ_CONNECT(idx, _) \
IRQ_CONNECT(DT_INST_IRQ_BY_IDX(0, idx, irq), DT_INST_IRQ_BY_IDX(0, idx, priority), \
vevif_task_rx_isr, &vevif_irqs[idx], 0)
#else

#define VEVIF_IRQ_FUN(idx, _) \
ISR_DIRECT_DECLARE(vevif_task_##idx##_rx_isr) \
{ \
vevif_task_rx_isr(&vevif_irqs[idx]); \
return 1; \
}

LISTIFY(DT_NUM_IRQS(DT_DRV_INST(0)), VEVIF_IRQ_FUN, ())

#define VEVIF_IRQ_CONNECT(idx, _) \
IRQ_DIRECT_CONNECT(DT_INST_IRQ_BY_IDX(0, idx, irq), DT_INST_IRQ_BY_IDX(0, idx, priority), \
vevif_task_##idx##_rx_isr, 0)
#endif

static int vevif_task_rx_init(const struct device *dev)
{
Expand Down

0 comments on commit 073a895

Please sign in to comment.