dma: dma_nxp_edma: perform IRQ enable/disable on channel request/release
Commit 48b98a92 ("drivers: dma: dma_nxp_edma: disable IRQs when not needed") moved the IRQ enable operation to edma_start() and added an IRQ disable operation in edma_stop(). This is wrong because it breaks the DMA API contract w.r.t dma_start() being `isr-ok` on imx8qm/imx8qxp. As such, move the IRQ enable and disable operations in dma_request_channel() and dma_release_channel(). Note1: managing the interrupts like this is only really needed when dealing with interrupt controllers that have a power domain associated with it (which is the case for irqstr on imx8qm/imx8qxp). Note2: Zephyr has no reference count for shared interrupts so disabling a shared interrupt without checking if someone else is using it is dangerous. Based on the aforementioned notes, the irq_disable() operation is only performed if irqstr is used as an interrupt controller (which is only the case for imx8qm/imx8qxp). Otherwise, the operation isn't needed. Fixes #80573. Signed-off-by:Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Loading
Please sign in to comment