From d48f2daafd0695d7289fb1e9dcdb87552cb17702 Mon Sep 17 00:00:00 2001 From: Jouni Ukkonen Date: Tue, 26 Nov 2024 13:13:25 +0200 Subject: [PATCH] arch/arm64/imx9: Clear DMA channel interrupts on init Avoid spurious interrupts on reboot Signed-off-by: Jouni Ukkonen --- arch/arm64/src/imx9/imx9_edma.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/src/imx9/imx9_edma.c b/arch/arm64/src/imx9/imx9_edma.c index 3c3110d4fe1d1..ec611da58366d 100644 --- a/arch/arm64/src/imx9/imx9_edma.c +++ b/arch/arm64/src/imx9/imx9_edma.c @@ -864,6 +864,10 @@ void weak_function arm64_dma_initialize(void) putreg32(0, IMX9_EDMA_TCD(base, chan) + IMX9_EDMA_CH_CSR_OFFSET); + /* Clear interrupt if any */ + + putreg32(1, IMX9_EDMA_TCD(base, chan) + IMX9_EDMA_CH_INT_OFFSET); + /* Set all TCD CSR, biter and citer entries to 0 so that * will be 0 when DONE is not set so that imx9_dmach_getcount * reports 0.