aboutsummaryrefslogtreecommitdiff
path: root/drivers/dma/fsl-edma-common.h
diff options
context:
space:
mode:
authorGravatar Frank Li <Frank.Li@nxp.com> 2023-08-21 12:16:10 -0400
committerGravatar Vinod Koul <vkoul@kernel.org> 2023-08-22 20:11:02 +0530
commit79434f9b97361601e65e0f5576e9760fefebf19a (patch)
treeacca8ff7b429d777ab2e434f40b6750e78d17891 /drivers/dma/fsl-edma-common.h
parentdmaengine: fsl-edma: Remove enum edma_version (diff)
downloadlinux-79434f9b97361601e65e0f5576e9760fefebf19a.tar.gz
linux-79434f9b97361601e65e0f5576e9760fefebf19a.tar.bz2
linux-79434f9b97361601e65e0f5576e9760fefebf19a.zip
dmaengine: fsl-edma: move common IRQ handler to common.c
Move the common part of IRQ handler from fsl-edma-main.c and mcf-edma-main.c to fsl-edma-common.c. This eliminates redundant code, as the both files contains mostly identical code. Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20230821161617.2142561-6-Frank.Li@nxp.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/fsl-edma-common.h')
-rw-r--r--drivers/dma/fsl-edma-common.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/dma/fsl-edma-common.h b/drivers/dma/fsl-edma-common.h
index 5f3fcb991b5e..242ab7df8993 100644
--- a/drivers/dma/fsl-edma-common.h
+++ b/drivers/dma/fsl-edma-common.h
@@ -219,6 +219,13 @@ static inline struct fsl_edma_desc *to_fsl_edma_desc(struct virt_dma_desc *vd)
return container_of(vd, struct fsl_edma_desc, vdesc);
}
+static inline void fsl_edma_err_chan_handler(struct fsl_edma_chan *fsl_chan)
+{
+ fsl_chan->status = DMA_ERROR;
+ fsl_chan->idle = true;
+}
+
+void fsl_edma_tx_chan_handler(struct fsl_edma_chan *fsl_chan);
void fsl_edma_disable_request(struct fsl_edma_chan *fsl_chan);
void fsl_edma_chan_mux(struct fsl_edma_chan *fsl_chan,
unsigned int slot, bool enable);