summaryrefslogtreecommitdiffstats
path: root/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
diff options
context:
space:
mode:
authorSia Jee Heng <jee.heng.sia@intel.com>2021-01-25 02:32:45 +0100
committerVinod Koul <vkoul@kernel.org>2021-02-01 10:38:15 +0100
commit1deb96c0fa58afe0f5c4aa8e5916baa9454979d6 (patch)
treeeeef142422b4ef40dc869da5531cf6e0d31c93ca /drivers/dma/dw-axi-dmac/dw-axi-dmac.h
parentdmaengine: dw-axi-dmac: Support device_prep_slave_sg (diff)
downloadlinux-1deb96c0fa58afe0f5c4aa8e5916baa9454979d6.tar.xz
linux-1deb96c0fa58afe0f5c4aa8e5916baa9454979d6.zip
dmaegine: dw-axi-dmac: Support device_prep_dma_cyclic()
Add support for device_prep_dma_cyclic() callback function to benefit DMA cyclic client, for example ALSA. Existing AxiDMA driver only support data transfer between memory to memory. Data transfer between device to memory and memory to device in cyclic mode would failed if this interface is not supported by the AxiDMA driver. Signed-off-by: Sia Jee Heng <jee.heng.sia@intel.com> Tested-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Link: https://lore.kernel.org/r/20210125013255.25799-8-jee.heng.sia@intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/dw-axi-dmac/dw-axi-dmac.h')
-rw-r--r--drivers/dma/dw-axi-dmac/dw-axi-dmac.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac.h b/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
index ac49f2e14b0c..a26b0a242a93 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
@@ -45,6 +45,7 @@ struct axi_dma_chan {
struct axi_dma_desc *desc;
struct dma_slave_config config;
enum dma_transfer_direction direction;
+ bool cyclic;
/* these other elements are all protected by vc.lock */
bool is_paused;
};
@@ -93,6 +94,7 @@ struct axi_dma_desc {
struct virt_dma_desc vd;
struct axi_dma_chan *chan;
+ u32 completed_blocks;
};
static inline struct device *dchan2dev(struct dma_chan *dchan)