diff options
author | Russell King - ARM Linux <linux@arm.linux.org.uk> | 2012-03-06 17:34:26 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2012-03-13 02:06:44 -0400 |
commit | d2ebfb335b0426deb1a4fb14e4e926d81ecd8235 (patch) | |
tree | 222c90df3fe29a08de668d862ed25d203404c315 /drivers | |
parent | 4d4e58de32a192fea65ab84509d17d199bd291c8 (diff) |
dmaengine: add private header file
Add a local private header file to contain definitions and declarations
which should only be used by DMA engine drivers.
We also fix linux/dmaengine.h to use LINUX_DMAENGINE_H to guard against
multiple inclusion.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
[imx-sdma.c & mxs-dma.c]
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/amba-pl08x.c | 2 | ||||
-rw-r--r-- | drivers/dma/at_hdmac.c | 1 | ||||
-rw-r--r-- | drivers/dma/coh901318.c | 1 | ||||
-rw-r--r-- | drivers/dma/dmaengine.h | 10 | ||||
-rw-r--r-- | drivers/dma/dw_dmac.c | 1 | ||||
-rw-r--r-- | drivers/dma/ep93xx_dma.c | 2 | ||||
-rw-r--r-- | drivers/dma/fsldma.c | 1 | ||||
-rw-r--r-- | drivers/dma/imx-dma.c | 2 | ||||
-rw-r--r-- | drivers/dma/imx-sdma.c | 2 | ||||
-rw-r--r-- | drivers/dma/intel_mid_dma.c | 2 | ||||
-rw-r--r-- | drivers/dma/ioat/dma.c | 2 | ||||
-rw-r--r-- | drivers/dma/ioat/dma_v2.c | 2 | ||||
-rw-r--r-- | drivers/dma/iop-adma.c | 2 | ||||
-rw-r--r-- | drivers/dma/ipu/ipu_idmac.c | 1 | ||||
-rw-r--r-- | drivers/dma/mpc512x_dma.c | 2 | ||||
-rw-r--r-- | drivers/dma/mv_xor.c | 2 | ||||
-rw-r--r-- | drivers/dma/mxs-dma.c | 2 | ||||
-rw-r--r-- | drivers/dma/pch_dma.c | 2 | ||||
-rw-r--r-- | drivers/dma/pl330.c | 2 | ||||
-rw-r--r-- | drivers/dma/ppc4xx/adma.c | 1 | ||||
-rw-r--r-- | drivers/dma/shdma.c | 2 | ||||
-rw-r--r-- | drivers/dma/ste_dma40.c | 1 | ||||
-rw-r--r-- | drivers/dma/timb_dma.c | 2 | ||||
-rw-r--r-- | drivers/dma/txx9dmac.c | 2 |
24 files changed, 49 insertions, 0 deletions
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c index e510447a685a..45f5e66e1c84 100644 --- a/drivers/dma/amba-pl08x.c +++ b/drivers/dma/amba-pl08x.c | |||
@@ -85,6 +85,8 @@ | |||
85 | #include <linux/slab.h> | 85 | #include <linux/slab.h> |
86 | #include <asm/hardware/pl080.h> | 86 | #include <asm/hardware/pl080.h> |
87 | 87 | ||
88 | #include "dmaengine.h" | ||
89 | |||
88 | #define DRIVER_NAME "pl08xdmac" | 90 | #define DRIVER_NAME "pl08xdmac" |
89 | 91 | ||
90 | static struct amba_driver pl08x_amba_driver; | 92 | static struct amba_driver pl08x_amba_driver; |
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 6baf5d717262..ce26ba381144 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/of_device.h> | 27 | #include <linux/of_device.h> |
28 | 28 | ||
29 | #include "at_hdmac_regs.h" | 29 | #include "at_hdmac_regs.h" |
30 | #include "dmaengine.h" | ||
30 | 31 | ||
31 | /* | 32 | /* |
32 | * Glossary | 33 | * Glossary |
diff --git a/drivers/dma/coh901318.c b/drivers/dma/coh901318.c index 521434bc3130..fb0d1245ade5 100644 --- a/drivers/dma/coh901318.c +++ b/drivers/dma/coh901318.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <mach/coh901318.h> | 24 | #include <mach/coh901318.h> |
25 | 25 | ||
26 | #include "coh901318_lli.h" | 26 | #include "coh901318_lli.h" |
27 | #include "dmaengine.h" | ||
27 | 28 | ||
28 | #define COHC_2_DEV(cohc) (&cohc->chan.dev->device) | 29 | #define COHC_2_DEV(cohc) (&cohc->chan.dev->device) |
29 | 30 | ||
diff --git a/drivers/dma/dmaengine.h b/drivers/dma/dmaengine.h new file mode 100644 index 000000000000..968570dde2eb --- /dev/null +++ b/drivers/dma/dmaengine.h | |||
@@ -0,0 +1,10 @@ | |||
1 | /* | ||
2 | * The contents of this file are private to DMA engine drivers, and is not | ||
3 | * part of the API to be used by DMA engine users. | ||
4 | */ | ||
5 | #ifndef DMAENGINE_H | ||
6 | #define DMAENGINE_H | ||
7 | |||
8 | #include <linux/dmaengine.h> | ||
9 | |||
10 | #endif | ||
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index 5bd23006ff4a..b279e1920725 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | 24 | ||
25 | #include "dw_dmac_regs.h" | 25 | #include "dw_dmac_regs.h" |
26 | #include "dmaengine.h" | ||
26 | 27 | ||
27 | /* | 28 | /* |
28 | * This supports the Synopsys "DesignWare AHB Central DMA Controller", | 29 | * This supports the Synopsys "DesignWare AHB Central DMA Controller", |
diff --git a/drivers/dma/ep93xx_dma.c b/drivers/dma/ep93xx_dma.c index bc457878cffd..326019832a13 100644 --- a/drivers/dma/ep93xx_dma.c +++ b/drivers/dma/ep93xx_dma.c | |||
@@ -28,6 +28,8 @@ | |||
28 | 28 | ||
29 | #include <mach/dma.h> | 29 | #include <mach/dma.h> |
30 | 30 | ||
31 | #include "dmaengine.h" | ||
32 | |||
31 | /* M2P registers */ | 33 | /* M2P registers */ |
32 | #define M2P_CONTROL 0x0000 | 34 | #define M2P_CONTROL 0x0000 |
33 | #define M2P_CONTROL_STALLINT BIT(0) | 35 | #define M2P_CONTROL_STALLINT BIT(0) |
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 9b5cb8a43cfa..2ebbe572f9e0 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/dmapool.h> | 35 | #include <linux/dmapool.h> |
36 | #include <linux/of_platform.h> | 36 | #include <linux/of_platform.h> |
37 | 37 | ||
38 | #include "dmaengine.h" | ||
38 | #include "fsldma.h" | 39 | #include "fsldma.h" |
39 | 40 | ||
40 | #define chan_dbg(chan, fmt, arg...) \ | 41 | #define chan_dbg(chan, fmt, arg...) \ |
diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index d3ddcba87f81..cead5e4bd38c 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c | |||
@@ -30,6 +30,8 @@ | |||
30 | #include <mach/dma-v1.h> | 30 | #include <mach/dma-v1.h> |
31 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
32 | 32 | ||
33 | #include "dmaengine.h" | ||
34 | |||
33 | struct imxdma_channel { | 35 | struct imxdma_channel { |
34 | struct imxdma_engine *imxdma; | 36 | struct imxdma_engine *imxdma; |
35 | unsigned int channel; | 37 | unsigned int channel; |
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 49aa4e876645..48a791f93adc 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c | |||
@@ -43,6 +43,8 @@ | |||
43 | #include <mach/dma.h> | 43 | #include <mach/dma.h> |
44 | #include <mach/hardware.h> | 44 | #include <mach/hardware.h> |
45 | 45 | ||
46 | #include "dmaengine.h" | ||
47 | |||
46 | /* SDMA registers */ | 48 | /* SDMA registers */ |
47 | #define SDMA_H_C0PTR 0x000 | 49 | #define SDMA_H_C0PTR 0x000 |
48 | #define SDMA_H_INTR 0x004 | 50 | #define SDMA_H_INTR 0x004 |
diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c index 40e47e6c7ed8..55d0451670b0 100644 --- a/drivers/dma/intel_mid_dma.c +++ b/drivers/dma/intel_mid_dma.c | |||
@@ -29,6 +29,8 @@ | |||
29 | #include <linux/intel_mid_dma.h> | 29 | #include <linux/intel_mid_dma.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | 31 | ||
32 | #include "dmaengine.h" | ||
33 | |||
32 | #define MAX_CHAN 4 /*max ch across controllers*/ | 34 | #define MAX_CHAN 4 /*max ch across controllers*/ |
33 | #include "intel_mid_dma_regs.h" | 35 | #include "intel_mid_dma_regs.h" |
34 | 36 | ||
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c index fab440af1f9a..dfe411b2014f 100644 --- a/drivers/dma/ioat/dma.c +++ b/drivers/dma/ioat/dma.c | |||
@@ -40,6 +40,8 @@ | |||
40 | #include "registers.h" | 40 | #include "registers.h" |
41 | #include "hw.h" | 41 | #include "hw.h" |
42 | 42 | ||
43 | #include "../dmaengine.h" | ||
44 | |||
43 | int ioat_pending_level = 4; | 45 | int ioat_pending_level = 4; |
44 | module_param(ioat_pending_level, int, 0644); | 46 | module_param(ioat_pending_level, int, 0644); |
45 | MODULE_PARM_DESC(ioat_pending_level, | 47 | MODULE_PARM_DESC(ioat_pending_level, |
diff --git a/drivers/dma/ioat/dma_v2.c b/drivers/dma/ioat/dma_v2.c index d3f0aff2c02a..6c1e6754d9bd 100644 --- a/drivers/dma/ioat/dma_v2.c +++ b/drivers/dma/ioat/dma_v2.c | |||
@@ -41,6 +41,8 @@ | |||
41 | #include "registers.h" | 41 | #include "registers.h" |
42 | #include "hw.h" | 42 | #include "hw.h" |
43 | 43 | ||
44 | #include "../dmaengine.h" | ||
45 | |||
44 | int ioat_ring_alloc_order = 8; | 46 | int ioat_ring_alloc_order = 8; |
45 | module_param(ioat_ring_alloc_order, int, 0644); | 47 | module_param(ioat_ring_alloc_order, int, 0644); |
46 | MODULE_PARM_DESC(ioat_ring_alloc_order, | 48 | MODULE_PARM_DESC(ioat_ring_alloc_order, |
diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index d8027c2b42c0..650bf1e185e8 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c | |||
@@ -36,6 +36,8 @@ | |||
36 | 36 | ||
37 | #include <mach/adma.h> | 37 | #include <mach/adma.h> |
38 | 38 | ||
39 | #include "dmaengine.h" | ||
40 | |||
39 | #define to_iop_adma_chan(chan) container_of(chan, struct iop_adma_chan, common) | 41 | #define to_iop_adma_chan(chan) container_of(chan, struct iop_adma_chan, common) |
40 | #define to_iop_adma_device(dev) \ | 42 | #define to_iop_adma_device(dev) \ |
41 | container_of(dev, struct iop_adma_device, common) | 43 | container_of(dev, struct iop_adma_device, common) |
diff --git a/drivers/dma/ipu/ipu_idmac.c b/drivers/dma/ipu/ipu_idmac.c index 9149ade6a5d9..0fcff6508fb1 100644 --- a/drivers/dma/ipu/ipu_idmac.c +++ b/drivers/dma/ipu/ipu_idmac.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <mach/ipu.h> | 26 | #include <mach/ipu.h> |
27 | 27 | ||
28 | #include "../dmaengine.h" | ||
28 | #include "ipu_intern.h" | 29 | #include "ipu_intern.h" |
29 | 30 | ||
30 | #define FS_VF_IN_VALID 0x00000002 | 31 | #define FS_VF_IN_VALID 0x00000002 |
diff --git a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c index 39a5cde9f428..c56b3fe5d3fa 100644 --- a/drivers/dma/mpc512x_dma.c +++ b/drivers/dma/mpc512x_dma.c | |||
@@ -44,6 +44,8 @@ | |||
44 | 44 | ||
45 | #include <linux/random.h> | 45 | #include <linux/random.h> |
46 | 46 | ||
47 | #include "dmaengine.h" | ||
48 | |||
47 | /* Number of DMA Transfer descriptors allocated per channel */ | 49 | /* Number of DMA Transfer descriptors allocated per channel */ |
48 | #define MPC_DMA_DESCRIPTORS 64 | 50 | #define MPC_DMA_DESCRIPTORS 64 |
49 | 51 | ||
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index c6a84dac112c..ee61778ba8a2 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c | |||
@@ -26,6 +26,8 @@ | |||
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/memory.h> | 27 | #include <linux/memory.h> |
28 | #include <plat/mv_xor.h> | 28 | #include <plat/mv_xor.h> |
29 | |||
30 | #include "dmaengine.h" | ||
29 | #include "mv_xor.h" | 31 | #include "mv_xor.h" |
30 | 32 | ||
31 | static void mv_xor_issue_pending(struct dma_chan *chan); | 33 | static void mv_xor_issue_pending(struct dma_chan *chan); |
diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c index 3696e6e4143a..daa84ee2a187 100644 --- a/drivers/dma/mxs-dma.c +++ b/drivers/dma/mxs-dma.c | |||
@@ -28,6 +28,8 @@ | |||
28 | #include <mach/dma.h> | 28 | #include <mach/dma.h> |
29 | #include <mach/common.h> | 29 | #include <mach/common.h> |
30 | 30 | ||
31 | #include "dmaengine.h" | ||
32 | |||
31 | /* | 33 | /* |
32 | * NOTE: The term "PIO" throughout the mxs-dma implementation means | 34 | * NOTE: The term "PIO" throughout the mxs-dma implementation means |
33 | * PIO mode of mxs apbh-dma and apbx-dma. With this working mode, | 35 | * PIO mode of mxs apbh-dma and apbx-dma. With this working mode, |
diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c index 79a71858497c..2b3479d850c9 100644 --- a/drivers/dma/pch_dma.c +++ b/drivers/dma/pch_dma.c | |||
@@ -25,6 +25,8 @@ | |||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/pch_dma.h> | 26 | #include <linux/pch_dma.h> |
27 | 27 | ||
28 | #include "dmaengine.h" | ||
29 | |||
28 | #define DRV_NAME "pch-dma" | 30 | #define DRV_NAME "pch-dma" |
29 | 31 | ||
30 | #define DMA_CTL0_DISABLE 0x0 | 32 | #define DMA_CTL0_DISABLE 0x0 |
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 99c31a76e74e..2db70748403f 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <linux/scatterlist.h> | 21 | #include <linux/scatterlist.h> |
22 | #include <linux/of.h> | 22 | #include <linux/of.h> |
23 | 23 | ||
24 | #include "dmaengine.h" | ||
25 | |||
24 | #define NR_DEFAULT_DESC 16 | 26 | #define NR_DEFAULT_DESC 16 |
25 | 27 | ||
26 | enum desc_status { | 28 | enum desc_status { |
diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c index f878322ecbcb..40082ec8326c 100644 --- a/drivers/dma/ppc4xx/adma.c +++ b/drivers/dma/ppc4xx/adma.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <asm/dcr.h> | 46 | #include <asm/dcr.h> |
47 | #include <asm/dcr-regs.h> | 47 | #include <asm/dcr-regs.h> |
48 | #include "adma.h" | 48 | #include "adma.h" |
49 | #include "../dmaengine.h" | ||
49 | 50 | ||
50 | enum ppc_adma_init_code { | 51 | enum ppc_adma_init_code { |
51 | PPC_ADMA_INIT_OK = 0, | 52 | PPC_ADMA_INIT_OK = 0, |
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index ae84c12e3865..c2914330b8fc 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c | |||
@@ -30,6 +30,8 @@ | |||
30 | #include <linux/kdebug.h> | 30 | #include <linux/kdebug.h> |
31 | #include <linux/spinlock.h> | 31 | #include <linux/spinlock.h> |
32 | #include <linux/rculist.h> | 32 | #include <linux/rculist.h> |
33 | |||
34 | #include "dmaengine.h" | ||
33 | #include "shdma.h" | 35 | #include "shdma.h" |
34 | 36 | ||
35 | /* DMA descriptor control */ | 37 | /* DMA descriptor control */ |
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index cfca2a06d1af..156b98f661a3 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <plat/ste_dma40.h> | 22 | #include <plat/ste_dma40.h> |
23 | 23 | ||
24 | #include "dmaengine.h" | ||
24 | #include "ste_dma40_ll.h" | 25 | #include "ste_dma40_ll.h" |
25 | 26 | ||
26 | #define D40_NAME "dma40" | 27 | #define D40_NAME "dma40" |
diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c index a1d15598cf7e..4b61879284d1 100644 --- a/drivers/dma/timb_dma.c +++ b/drivers/dma/timb_dma.c | |||
@@ -31,6 +31,8 @@ | |||
31 | 31 | ||
32 | #include <linux/timb_dma.h> | 32 | #include <linux/timb_dma.h> |
33 | 33 | ||
34 | #include "dmaengine.h" | ||
35 | |||
34 | #define DRIVER_NAME "timb-dma" | 36 | #define DRIVER_NAME "timb-dma" |
35 | 37 | ||
36 | /* Global DMA registers */ | 38 | /* Global DMA registers */ |
diff --git a/drivers/dma/txx9dmac.c b/drivers/dma/txx9dmac.c index a917b6723bad..db6d809d4d04 100644 --- a/drivers/dma/txx9dmac.c +++ b/drivers/dma/txx9dmac.c | |||
@@ -15,6 +15,8 @@ | |||
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | #include <linux/scatterlist.h> | 17 | #include <linux/scatterlist.h> |
18 | |||
19 | #include "dmaengine.h" | ||
18 | #include "txx9dmac.h" | 20 | #include "txx9dmac.h" |
19 | 21 | ||
20 | static struct txx9dmac_chan *to_txx9dmac_chan(struct dma_chan *chan) | 22 | static struct txx9dmac_chan *to_txx9dmac_chan(struct dma_chan *chan) |