Skip to content

Commit

Permalink
drivers: imx: interrupt: Use Zephyr wrapper definitions
Browse files Browse the repository at this point in the history
For the functions platform_interrupt_clear and platform_interrupt_set,
the existing definitions based on arch_interrupt_* do not compile with
the xt-clang 2023 toolchain for imx. Use the Zephyr wrapper
implementations for those for now.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
  • Loading branch information
Paul Olaru authored and dbaluta committed May 15, 2023
1 parent ef38a0c commit 1ae0d1a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/drivers/imx/interrupt-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ int irqstr_get_sof_int(int irqstr_int)

void platform_interrupt_init(void) {}

#ifndef __ZEPHYR__
void platform_interrupt_set(uint32_t irq)
{
arch_interrupt_set(irq);
Expand All @@ -45,6 +46,7 @@ void platform_interrupt_clear(uint32_t irq, uint32_t mask)
{
arch_interrupt_clear(irq);
}
#endif /* __ZEPHYR__ */

uint32_t platform_interrupt_get_enabled(void)
{
Expand Down
2 changes: 2 additions & 0 deletions src/drivers/imx/interrupt-irqsteer.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ void platform_interrupt_init(void)
interrupt_cascade_register(dsp_irq + i);
}

#ifndef __ZEPHYR__
void platform_interrupt_set(uint32_t irq)
{
if (interrupt_is_dsp_direct(irq))
Expand All @@ -462,6 +463,7 @@ void platform_interrupt_clear(uint32_t irq, uint32_t mask)
if (interrupt_is_dsp_direct(irq))
arch_interrupt_clear(irq);
}
#endif /* __ZEPHYR */

uint32_t platform_interrupt_get_enabled(void)
{
Expand Down
2 changes: 1 addition & 1 deletion zephyr/wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ void interrupt_unmask(uint32_t irq, unsigned int cpu)
{
/* TODO: how do we unmask on other cores with Zephyr APIs */
}
#endif

void platform_interrupt_set(uint32_t irq)
{
Expand All @@ -117,7 +118,6 @@ void platform_interrupt_clear(uint32_t irq, uint32_t mask)
{
/* handled by zephyr - needed for linkage */
}
#endif

/*
* Asynchronous Messaging Service
Expand Down

0 comments on commit 1ae0d1a

Please sign in to comment.