arch: riscv: implement arch_irq_disconnect_dynamic
For SoC with `CONFIG_RISCV_RESERVED_IRQ_ISR_TABLES_OFFSET`, it should be taken into consideration when disconnecting IRQ. Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
This commit is contained in:
parent
ae0822d0bf
commit
e17b3fd884
1 changed files with 14 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
||||||
#include <zephyr/logging/log.h>
|
#include <zephyr/logging/log.h>
|
||||||
#include <zephyr/arch/riscv/csr.h>
|
#include <zephyr/arch/riscv/csr.h>
|
||||||
#include <zephyr/irq_multilevel.h>
|
#include <zephyr/irq_multilevel.h>
|
||||||
|
#include <zephyr/sw_isr_table.h>
|
||||||
|
|
||||||
#ifdef CONFIG_RISCV_HAS_PLIC
|
#ifdef CONFIG_RISCV_HAS_PLIC
|
||||||
#include <zephyr/drivers/interrupt_controller/riscv_plic.h>
|
#include <zephyr/drivers/interrupt_controller/riscv_plic.h>
|
||||||
|
@ -53,4 +54,17 @@ int arch_irq_connect_dynamic(unsigned int irq, unsigned int priority,
|
||||||
#endif
|
#endif
|
||||||
return irq;
|
return irq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_SHARED_INTERRUPTS
|
||||||
|
int arch_irq_disconnect_dynamic(unsigned int irq, unsigned int priority,
|
||||||
|
void (*routine)(const void *parameter), const void *parameter,
|
||||||
|
uint32_t flags)
|
||||||
|
{
|
||||||
|
ARG_UNUSED(priority);
|
||||||
|
ARG_UNUSED(flags);
|
||||||
|
|
||||||
|
return z_isr_uninstall(irq + CONFIG_RISCV_RESERVED_IRQ_ISR_TABLES_OFFSET, routine,
|
||||||
|
parameter);
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_SHARED_INTERRUPTS */
|
||||||
#endif /* CONFIG_DYNAMIC_INTERRUPTS */
|
#endif /* CONFIG_DYNAMIC_INTERRUPTS */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue