dmaengine: mcf-edma: utilize edma_write_tcdreg() macro for TCD Access
authorFrank Li <Frank.Li@nxp.com>
Thu, 21 Dec 2023 15:35:26 +0000 (10:35 -0500)
committerVinod Koul <vkoul@kernel.org>
Wed, 7 Feb 2024 08:40:17 +0000 (09:40 +0100)
The TCD structure has undergone modifications, incorporating fields
extended to 64 bits. When TCD64 is enabled, the TCD type shifts to
'void *'. Use of the edma_write_tcdreg() macro to facilitate TCD register
access.

Add cpu_to_le32(0) to ensure little-endian compatibility with TCD
registers and avoid a build warning.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20231221153528.1588049-5-Frank.Li@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/mcf-edma-main.c

index ab21455d9c3a48a865c2338e30eeb6e5ec1f7875..dba63178387678f4a27b05f644bb5d4c4ac402a4 100644 (file)
@@ -202,7 +202,7 @@ static int mcf_edma_probe(struct platform_device *pdev)
                vchan_init(&mcf_chan->vchan, &mcf_edma->dma_dev);
                mcf_chan->tcd = mcf_edma->membase + EDMA_TCD
                                + i * sizeof(struct fsl_edma_hw_tcd);
-               iowrite32(0x0, &mcf_chan->tcd->csr);
+               edma_write_tcdreg(mcf_chan, cpu_to_le32(0), csr);
        }
 
        iowrite32(~0, regs->inth);