Merge branch 'topic/omap' into for-linus
This commit is contained in:
commit
0e0fa66e39
10 changed files with 430 additions and 6 deletions
|
|
@ -230,6 +230,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
|
||||
|
|
@ -241,6 +251,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 {
|
||||
|
|
@ -256,6 +268,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;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@ struct of_dma {
|
|||
struct device_node *of_node;
|
||||
struct dma_chan *(*of_dma_xlate)
|
||||
(struct of_phandle_args *, struct of_dma *);
|
||||
void *(*of_dma_route_allocate)
|
||||
(struct of_phandle_args *, struct of_dma *);
|
||||
struct dma_router *dma_router;
|
||||
void *of_dma_data;
|
||||
};
|
||||
|
||||
|
|
@ -37,12 +40,20 @@ extern int of_dma_controller_register(struct device_node *np,
|
|||
(struct of_phandle_args *, struct of_dma *),
|
||||
void *data);
|
||||
extern void of_dma_controller_free(struct device_node *np);
|
||||
|
||||
extern int of_dma_router_register(struct device_node *np,
|
||||
void *(*of_dma_route_allocate)
|
||||
(struct of_phandle_args *, struct of_dma *),
|
||||
struct dma_router *dma_router);
|
||||
#define of_dma_router_free of_dma_controller_free
|
||||
|
||||
extern struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
|
||||
const char *name);
|
||||
extern struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec,
|
||||
struct of_dma *ofdma);
|
||||
extern struct dma_chan *of_dma_xlate_by_chan_id(struct of_phandle_args *dma_spec,
|
||||
struct of_dma *ofdma);
|
||||
|
||||
#else
|
||||
static inline int of_dma_controller_register(struct device_node *np,
|
||||
struct dma_chan *(*of_dma_xlate)
|
||||
|
|
@ -56,6 +67,16 @@ static inline void of_dma_controller_free(struct device_node *np)
|
|||
{
|
||||
}
|
||||
|
||||
static inline int of_dma_router_register(struct device_node *np,
|
||||
void *(*of_dma_route_allocate)
|
||||
(struct of_phandle_args *, struct of_dma *),
|
||||
struct dma_router *dma_router)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
#define of_dma_router_free of_dma_controller_free
|
||||
|
||||
static inline struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
|
||||
const char *name)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue