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>
This commit is contained in:
parent
b787f68c36
commit
56f13c0d95
5 changed files with 162 additions and 0 deletions
|
@ -221,6 +221,16 @@ struct dma_chan_percpu {
|
|||
unsigned long bytes_transferred;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dma_router - DMA router structure
|
||||
* @dev: pointer to the DMA router device
|
||||
* @route_free: function to be called when the route can be disconnected
|
||||
*/
|
||||
struct dma_router {
|
||||
struct device *dev;
|
||||
void (*route_free)(struct device *dev, void *route_data);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dma_chan - devices supply DMA channels, clients use them
|
||||
* @device: ptr to the dma device who supplies this channel, always !%NULL
|
||||
|
@ -232,6 +242,8 @@ struct dma_chan_percpu {
|
|||
* @local: per-cpu pointer to a struct dma_chan_percpu
|
||||
* @client_count: how many clients are using this channel
|
||||
* @table_count: number of appearances in the mem-to-mem allocation table
|
||||
* @router: pointer to the DMA router structure
|
||||
* @route_data: channel specific data for the router
|
||||
* @private: private data for certain client-channel associations
|
||||
*/
|
||||
struct dma_chan {
|
||||
|
@ -247,6 +259,11 @@ struct dma_chan {
|
|||
struct dma_chan_percpu __percpu *local;
|
||||
int client_count;
|
||||
int table_count;
|
||||
|
||||
/* DMA router */
|
||||
struct dma_router *router;
|
||||
void *route_data;
|
||||
|
||||
void *private;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue