aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/plat-samsung/dma-ops.c6
-rw-r--r--drivers/dma/pl330.c15
-rw-r--r--include/linux/amba/pl330.h2
3 files changed, 17 insertions, 6 deletions
diff --git a/arch/arm/plat-samsung/dma-ops.c b/arch/arm/plat-samsung/dma-ops.c
index 93a994a5dd8..889c2c22325 100644
--- a/arch/arm/plat-samsung/dma-ops.c
+++ b/arch/arm/plat-samsung/dma-ops.c
@@ -18,12 +18,6 @@
18 18
19#include <mach/dma.h> 19#include <mach/dma.h>
20 20
21static inline bool pl330_filter(struct dma_chan *chan, void *param)
22{
23 struct dma_pl330_peri *peri = chan->private;
24 return peri->peri_id == (unsigned)param;
25}
26
27static unsigned samsung_dmadev_request(enum dma_ch dma_ch, 21static unsigned samsung_dmadev_request(enum dma_ch dma_ch,
28 struct samsung_dma_info *info) 22 struct samsung_dma_info *info)
29{ 23{
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 571041477ab..0c434dca4bf 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 */
120static struct amba_driver pl330_driver;
121
119static inline struct dma_pl330_chan * 122static inline struct dma_pl330_chan *
120to_pchan(struct dma_chan *ch) 123to_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
273bool 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}
283EXPORT_SYMBOL(pl330_filter);
284
270static int pl330_alloc_chan_resources(struct dma_chan *chan) 285static 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);
diff --git a/include/linux/amba/pl330.h b/include/linux/amba/pl330.h
index d12f077a6da..6db72dae2f1 100644
--- a/include/linux/amba/pl330.h
+++ b/include/linux/amba/pl330.h
@@ -12,6 +12,7 @@
12#ifndef __AMBA_PL330_H_ 12#ifndef __AMBA_PL330_H_
13#define __AMBA_PL330_H_ 13#define __AMBA_PL330_H_
14 14
15#include <linux/dmaengine.h>
15#include <asm/hardware/pl330.h> 16#include <asm/hardware/pl330.h>
16 17
17struct dma_pl330_peri { 18struct dma_pl330_peri {
@@ -38,4 +39,5 @@ struct dma_pl330_platdata {
38 unsigned mcbuf_sz; 39 unsigned mcbuf_sz;
39}; 40};
40 41
42extern bool pl330_filter(struct dma_chan *chan, void *param);
41#endif /* __AMBA_PL330_H_ */ 43#endif /* __AMBA_PL330_H_ */