Commit 9eeacd3a authored by Robert Jarzmik's avatar Robert Jarzmik Committed by Vinod Koul

dmaengine: enable DMA_CTRL_REUSE

In the current state, the capability of transfer reuse can neither be
set by a slave dmaengine driver, nor used by a client driver, because
the capability is not available to dma_get_slave_caps().

Fix this by adding a way to declare the capability.

Fixes: 27242021 ("dmaengine: Add DMA_CTRL_REUSE")
Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 13bb26ae
...@@ -493,6 +493,7 @@ int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps) ...@@ -493,6 +493,7 @@ int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps)
caps->dst_addr_widths = device->dst_addr_widths; caps->dst_addr_widths = device->dst_addr_widths;
caps->directions = device->directions; caps->directions = device->directions;
caps->residue_granularity = device->residue_granularity; caps->residue_granularity = device->residue_granularity;
caps->descriptor_reuse = device->descriptor_reuse;
/* /*
* Some devices implement only pause (e.g. to get residuum) but no * Some devices implement only pause (e.g. to get residuum) but no
......
...@@ -659,6 +659,7 @@ enum dmaengine_alignment { ...@@ -659,6 +659,7 @@ enum dmaengine_alignment {
* struct with auxiliary transfer status information, otherwise the call * struct with auxiliary transfer status information, otherwise the call
* will just return a simple status code * will just return a simple status code
* @device_issue_pending: push pending transactions to hardware * @device_issue_pending: push pending transactions to hardware
* @descriptor_reuse: a submitted transfer can be resubmitted after completion
*/ */
struct dma_device { struct dma_device {
...@@ -681,6 +682,7 @@ struct dma_device { ...@@ -681,6 +682,7 @@ struct dma_device {
u32 src_addr_widths; u32 src_addr_widths;
u32 dst_addr_widths; u32 dst_addr_widths;
u32 directions; u32 directions;
bool descriptor_reuse;
enum dma_residue_granularity residue_granularity; enum dma_residue_granularity residue_granularity;
int (*device_alloc_chan_resources)(struct dma_chan *chan); int (*device_alloc_chan_resources)(struct dma_chan *chan);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment