diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2019-05-16 12:44:30 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2019-05-21 10:38:18 +0530 |
commit | a3ee0bf23eaec2ae46fc6b1266bdaa5995b55c1e (patch) | |
tree | 271c1f587fff405669a099f5d70f08b4568a0130 /drivers/dma/dma-axi-dmac.c | |
parent | 8add6cce98482da67e971addd7eae8f22f8e6c7a (diff) | |
download | linux-a3ee0bf23eaec2ae46fc6b1266bdaa5995b55c1e.tar.bz2 |
dmaengine: axi-dmac: Enable TLAST handling
The TLAST flag is used by the DMAC HDL controller to signal to the
controller that the following segment (to be submitted) is the last one (in
a series of segments).
A receiver DMA (typically another DMAC) can read this parameter (from the
transfer), and terminate the transfer earlier. A typical use-case for this,
is when the receiver expects a certain amount of segments, but for some
reason (e.g. an ADC capture which can have an unknown number of digital
samples) the number of actual segments is smaller. The receiver would read
this flag, and then the DMAC would finish.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/dma-axi-dmac.c')
-rw-r--r-- | drivers/dma/dma-axi-dmac.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c index 4d2cae0bebb5..8e64b81c2d3c 100644 --- a/drivers/dma/dma-axi-dmac.c +++ b/drivers/dma/dma-axi-dmac.c @@ -71,6 +71,7 @@ #define AXI_DMAC_IRQ_EOT BIT(1) #define AXI_DMAC_FLAG_CYCLIC BIT(0) +#define AXI_DMAC_FLAG_LAST BIT(1) /* The maximum ID allocated by the hardware is 31 */ #define AXI_DMAC_SG_UNUSED 32U @@ -216,6 +217,7 @@ static void axi_dmac_start_transfer(struct axi_dmac_chan *chan) desc->num_submitted = 0; /* Start again */ else chan->next_desc = NULL; + flags |= AXI_DMAC_FLAG_LAST; } else { chan->next_desc = desc; } |