Skip to content

Commit

Permalink
fix dmabug
Browse files Browse the repository at this point in the history
  • Loading branch information
pussuw committed Apr 23, 2024
1 parent 9439e9e commit 4769435
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions arch/arm64/src/imx9/imx9_edma.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,12 +812,12 @@ void weak_function arm64_dma_initialize(void)

/* Initialize the channel */

for (i = 0; i < DMA3_CHANNEL_COUNT; i++)
for (i = 0; i < DMA3_CHANNEL_COUNT; i++, dmach++)
{
dmach->base = IMX9_DMA3_BASE;
dmach->chan = i;

irq_attach(IMX9_IRQ_DMA3_0 + i, imx9_edma_interrupt, dmach++);
irq_attach(IMX9_IRQ_DMA3_0 + i, imx9_edma_interrupt, dmach);
}
#endif

Expand All @@ -830,12 +830,17 @@ void weak_function arm64_dma_initialize(void)

/* Initialize the channel */

for (i = 0; i < DMA4_CHANNEL_COUNT; i++)
for (i = 0; i < DMA4_CHANNEL_COUNT; i++, dmach++)
{
dmach->base = IMX9_DMA4_BASE;
dmach->chan = i;

irq_attach(IMX9_IRQ_DMA4_0_1 + i, imx9_edma_interrupt, dmach++);
/* Attach interrupt for every second channel */

if ((i & 0x01) == 0)
{
irq_attach(IMX9_IRQ_DMA4_0_1 + (i >> 1), imx9_edma_interrupt, dmach);
}
}
#endif

Expand Down

0 comments on commit 4769435

Please sign in to comment.