summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/dmaengine.h38
1 files changed, 6 insertions, 32 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index b7724a5d4661..b6997a0cb528 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -761,38 +761,6 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_sg(
src_sg, src_nents, flags);
}
-static inline int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps)
-{
- struct dma_device *device;
-
- if (!chan || !caps)
- return -EINVAL;
-
- device = chan->device;
-
- /* check if the channel supports slave transactions */
- if (!test_bit(DMA_SLAVE, device->cap_mask.bits))
- return -ENXIO;
-
- /*
- * Check whether it reports it uses the generic slave
- * capabilities, if not, that means it doesn't support any
- * kind of slave capabilities reporting.
- */
- if (!device->directions)
- return -ENXIO;
-
- caps->src_addr_widths = device->src_addr_widths;
- caps->dst_addr_widths = device->dst_addr_widths;
- caps->directions = device->directions;
- caps->residue_granularity = device->residue_granularity;
-
- caps->cmd_pause = !!device->device_pause;
- caps->cmd_terminate = !!device->device_terminate_all;
-
- return 0;
-}
-
static inline int dmaengine_terminate_all(struct dma_chan *chan)
{
if (chan->device->device_terminate_all)
@@ -1081,6 +1049,7 @@ struct dma_chan *dma_request_slave_channel_reason(struct device *dev,
const char *name);
struct dma_chan *dma_request_slave_channel(struct device *dev, const char *name);
void dma_release_channel(struct dma_chan *chan);
+int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps);
#else
static inline struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type)
{
@@ -1115,6 +1084,11 @@ static inline struct dma_chan *dma_request_slave_channel(struct device *dev,
static inline void dma_release_channel(struct dma_chan *chan)
{
}
+static inline int dma_get_slave_caps(struct dma_chan *chan,
+ struct dma_slave_caps *caps)
+{
+ return -ENXIO;
+}
#endif
/* --- DMA device --- */