summaryrefslogtreecommitdiffstats
path: root/include/linux/dmaengine.h
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2015-04-09 05:35:47 -0400
committerVinod Koul <vinod.koul@intel.com>2015-05-09 07:41:25 -0400
commit56f13c0d9524c5816f5dc9c91b9d766d6b1064ca (patch)
tree4cdec4de3dbde9fd36d757f50e900811506969c7 /include/linux/dmaengine.h
parentb787f68c36d49bb1d9236f403813641efa74a031 (diff)
dmaengine: of_dma: Support for DMA routers
DMA routers are transparent devices used to mux DMA requests from peripherals to DMA controllers. They are used when the SoC integrates more devices with DMA requests then their controller can handle. DRA7x is one example of such SoC, where the sDMA can hanlde 128 DMA request lines, but in SoC level it has 205 DMA requests. The of_dma_router will be registered as of_dma_controller with special xlate function and additional parameters. The driver for the router is responsible to craft the dma_spec (in the of_dma_route_allocate callback) which can be used to requests a DMA channel from the real DMA controller. This way the router can be transparent for the system while remaining generic enough to be used in different environments. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'include/linux/dmaengine.h')
-rw-r--r--include/linux/dmaengine.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index ad419757241f..abf63ceabef9 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -222,6 +222,16 @@ struct dma_chan_percpu {
222}; 222};
223 223
224/** 224/**
225 * struct dma_router - DMA router structure
226 * @dev: pointer to the DMA router device
227 * @route_free: function to be called when the route can be disconnected
228 */
229struct dma_router {
230 struct device *dev;
231 void (*route_free)(struct device *dev, void *route_data);
232};
233
234/**
225 * struct dma_chan - devices supply DMA channels, clients use them 235 * struct dma_chan - devices supply DMA channels, clients use them
226 * @device: ptr to the dma device who supplies this channel, always !%NULL 236 * @device: ptr to the dma device who supplies this channel, always !%NULL
227 * @cookie: last cookie value returned to client 237 * @cookie: last cookie value returned to client
@@ -232,6 +242,8 @@ struct dma_chan_percpu {
232 * @local: per-cpu pointer to a struct dma_chan_percpu 242 * @local: per-cpu pointer to a struct dma_chan_percpu
233 * @client_count: how many clients are using this channel 243 * @client_count: how many clients are using this channel
234 * @table_count: number of appearances in the mem-to-mem allocation table 244 * @table_count: number of appearances in the mem-to-mem allocation table
245 * @router: pointer to the DMA router structure
246 * @route_data: channel specific data for the router
235 * @private: private data for certain client-channel associations 247 * @private: private data for certain client-channel associations
236 */ 248 */
237struct dma_chan { 249struct dma_chan {
@@ -247,6 +259,11 @@ struct dma_chan {
247 struct dma_chan_percpu __percpu *local; 259 struct dma_chan_percpu __percpu *local;
248 int client_count; 260 int client_count;
249 int table_count; 261 int table_count;
262
263 /* DMA router */
264 struct dma_router *router;
265 void *route_data;
266
250 void *private; 267 void *private;
251}; 268};
252 269