Skip to content

Commit

Permalink
dmaengine: fsl-edma: move clearing of register interrupt into setup_i…
Browse files Browse the repository at this point in the history
…rq function

This accommodates differences in the register layout of EDMA v3 by moving
the clearing of register interrupts into the platform-specific set_irq
function. This should ensure better compatibility with EDMA v3.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20230821161617.2142561-9-Frank.Li@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
  • Loading branch information
Frank Li authored and Vinod Koul committed Aug 22, 2023
1 parent a9903de commit f5b3ba5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/dma/fsl-edma-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ fsl_edma_irq_init(struct platform_device *pdev, struct fsl_edma_engine *fsl_edma
{
int ret;

edma_writel(fsl_edma, ~0, fsl_edma->regs.intl);

fsl_edma->txirq = platform_get_irq_byname(pdev, "edma-tx");
if (fsl_edma->txirq < 0)
return fsl_edma->txirq;
Expand Down Expand Up @@ -154,6 +156,8 @@ fsl_edma2_irq_init(struct platform_device *pdev,
int i, ret, irq;
int count;

edma_writel(fsl_edma, ~0, fsl_edma->regs.intl);

count = platform_irq_count(pdev);
dev_dbg(&pdev->dev, "%s Found %d interrupts\r\n", __func__, count);
if (count <= 2) {
Expand Down Expand Up @@ -321,7 +325,6 @@ static int fsl_edma_probe(struct platform_device *pdev)
fsl_edma_chan_mux(fsl_chan, 0, false);
}

edma_writel(fsl_edma, ~0, regs->intl);
ret = fsl_edma->drvdata->setup_irq(pdev, fsl_edma);
if (ret)
return ret;
Expand Down

0 comments on commit f5b3ba5

Please sign in to comment.