diff options
author | Zhangfei Gao <zhangfei.gao@linaro.org> | 2013-06-28 20:39:12 +0800 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 11:44:46 +0900 |
commit | a3d8259beec61d6308e307b8359b142bd9f846cb (patch) | |
tree | 6f9f6cdff0bf38908885243b11b0bc08188b5c6f /include | |
parent | e951d72f67192ebbeb7baf1ba01fc72e7d4be245 (diff) | |
download | linux-3.10-a3d8259beec61d6308e307b8359b142bd9f846cb.tar.gz linux-3.10-a3d8259beec61d6308e307b8359b142bd9f846cb.tar.bz2 linux-3.10-a3d8259beec61d6308e307b8359b142bd9f846cb.zip |
dmaengine: add interface of dma_get_slave_channel
Suggested by Arnd, add dma_get_slave_channel interface
Dma host driver could get specific channel specificied by request line, rather than filter.
host example:
static struct dma_chan *xx_of_dma_simple_xlate(struct of_phandle_args *dma_spec,
struct of_dma *ofdma)
{
struct xx_dma_dev *d = ofdma->of_dma_data;
unsigned int request = dma_spec->args[0];
if (request > d->dma_requests)
return NULL;
return dma_get_slave_channel(&(d->chans[request].vc.chan));
}
probe:
of_dma_controller_register((&op->dev)->of_node, xx_of_dma_simple_xlate, d);
Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/dmaengine.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 5642335f2c3..99b4f593899 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -1044,6 +1044,7 @@ int dma_async_device_register(struct dma_device *device); void dma_async_device_unregister(struct dma_device *device); void dma_run_dependencies(struct dma_async_tx_descriptor *tx); struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type); +struct dma_chan *dma_get_slave_channel(struct dma_chan *chan); struct dma_chan *net_dma_find_channel(void); #define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y) #define dma_request_slave_channel_compat(mask, x, y, dev, name) \ |