diff options
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/pl330.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 571041477ab2..0c434dca4bf2 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c | |||
@@ -116,6 +116,9 @@ struct dma_pl330_desc { | |||
116 | struct dma_pl330_chan *pchan; | 116 | struct dma_pl330_chan *pchan; |
117 | }; | 117 | }; |
118 | 118 | ||
119 | /* forward declaration */ | ||
120 | static struct amba_driver pl330_driver; | ||
121 | |||
119 | static inline struct dma_pl330_chan * | 122 | static inline struct dma_pl330_chan * |
120 | to_pchan(struct dma_chan *ch) | 123 | to_pchan(struct dma_chan *ch) |
121 | { | 124 | { |
@@ -267,6 +270,18 @@ static void dma_pl330_rqcb(void *token, enum pl330_op_err err) | |||
267 | tasklet_schedule(&pch->task); | 270 | tasklet_schedule(&pch->task); |
268 | } | 271 | } |
269 | 272 | ||
273 | bool pl330_filter(struct dma_chan *chan, void *param) | ||
274 | { | ||
275 | struct dma_pl330_peri *peri; | ||
276 | |||
277 | if (chan->device->dev->driver != &pl330_driver.drv) | ||
278 | return false; | ||
279 | |||
280 | peri = chan->private; | ||
281 | return peri->peri_id == (unsigned)param; | ||
282 | } | ||
283 | EXPORT_SYMBOL(pl330_filter); | ||
284 | |||
270 | static int pl330_alloc_chan_resources(struct dma_chan *chan) | 285 | static int pl330_alloc_chan_resources(struct dma_chan *chan) |
271 | { | 286 | { |
272 | struct dma_pl330_chan *pch = to_pchan(chan); | 287 | struct dma_pl330_chan *pch = to_pchan(chan); |