diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2008-12-16 06:17:47 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2008-12-16 06:17:47 -0500 |
commit | 33ebc19d5448aadb2ce4a865d7118f1c2f23fafe (patch) | |
tree | 1240902d096daa9635cf1c43c1204737bb7c9fcb /arch/arm/plat-mxc | |
parent | 7e1548a597ef7e26d5d62f8be3be6da9e101b26c (diff) |
[ARM] MX2: DMA updates
This one updates DMA support on MX2 which got broken in:
[ARM] Hide ISA DMA API when ISA_DMA_API is unset
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/plat-mxc')
-rw-r--r-- | arch/arm/plat-mxc/dma-mx1-mx2.c | 7 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h | 10 |
2 files changed, 9 insertions, 8 deletions
diff --git a/arch/arm/plat-mxc/dma-mx1-mx2.c b/arch/arm/plat-mxc/dma-mx1-mx2.c index 214274344442..e1c2eb497fbc 100644 --- a/arch/arm/plat-mxc/dma-mx1-mx2.c +++ b/arch/arm/plat-mxc/dma-mx1-mx2.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <asm/system.h> | 34 | #include <asm/system.h> |
35 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
36 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
37 | #include <mach/dma.h> | ||
38 | #include <mach/dma-mx1-mx2.h> | 37 | #include <mach/dma-mx1-mx2.h> |
39 | 38 | ||
40 | #define DMA_DCR 0x00 /* Control Register */ | 39 | #define DMA_DCR 0x00 /* Control Register */ |
@@ -114,7 +113,7 @@ struct imx_dma_channel { | |||
114 | void (*err_handler) (int, void *, int errcode); | 113 | void (*err_handler) (int, void *, int errcode); |
115 | void (*prog_handler) (int, void *, struct scatterlist *); | 114 | void (*prog_handler) (int, void *, struct scatterlist *); |
116 | void *data; | 115 | void *data; |
117 | dmamode_t dma_mode; | 116 | unsigned int dma_mode; |
118 | struct scatterlist *sg; | 117 | struct scatterlist *sg; |
119 | unsigned int resbytes; | 118 | unsigned int resbytes; |
120 | int dma_num; | 119 | int dma_num; |
@@ -193,7 +192,7 @@ static inline int imx_dma_sg_next(int channel, struct scatterlist *sg) | |||
193 | int | 192 | int |
194 | imx_dma_setup_single(int channel, dma_addr_t dma_address, | 193 | imx_dma_setup_single(int channel, dma_addr_t dma_address, |
195 | unsigned int dma_length, unsigned int dev_addr, | 194 | unsigned int dma_length, unsigned int dev_addr, |
196 | dmamode_t dmamode) | 195 | unsigned int dmamode) |
197 | { | 196 | { |
198 | struct imx_dma_channel *imxdma = &imx_dma_channels[channel]; | 197 | struct imx_dma_channel *imxdma = &imx_dma_channels[channel]; |
199 | 198 | ||
@@ -288,7 +287,7 @@ int | |||
288 | imx_dma_setup_sg(int channel, | 287 | imx_dma_setup_sg(int channel, |
289 | struct scatterlist *sg, unsigned int sgcount, | 288 | struct scatterlist *sg, unsigned int sgcount, |
290 | unsigned int dma_length, unsigned int dev_addr, | 289 | unsigned int dma_length, unsigned int dev_addr, |
291 | dmamode_t dmamode) | 290 | unsigned int dmamode) |
292 | { | 291 | { |
293 | struct imx_dma_channel *imxdma = &imx_dma_channels[channel]; | 292 | struct imx_dma_channel *imxdma = &imx_dma_channels[channel]; |
294 | 293 | ||
diff --git a/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h b/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h index 6cc6f0c8cb25..b3876cc238ca 100644 --- a/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h +++ b/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h | |||
@@ -22,13 +22,15 @@ | |||
22 | * MA 02110-1301, USA. | 22 | * MA 02110-1301, USA. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <mach/dma.h> | ||
26 | |||
27 | #ifndef __ASM_ARCH_MXC_DMA_H | 25 | #ifndef __ASM_ARCH_MXC_DMA_H |
28 | #define __ASM_ARCH_MXC_DMA_H | 26 | #define __ASM_ARCH_MXC_DMA_H |
29 | 27 | ||
30 | #define IMX_DMA_CHANNELS 16 | 28 | #define IMX_DMA_CHANNELS 16 |
31 | 29 | ||
30 | #define DMA_MODE_READ 0 | ||
31 | #define DMA_MODE_WRITE 1 | ||
32 | #define DMA_MODE_MASK 1 | ||
33 | |||
32 | #define DMA_BASE IO_ADDRESS(DMA_BASE_ADDR) | 34 | #define DMA_BASE IO_ADDRESS(DMA_BASE_ADDR) |
33 | 35 | ||
34 | #define IMX_DMA_MEMSIZE_32 (0 << 4) | 36 | #define IMX_DMA_MEMSIZE_32 (0 << 4) |
@@ -54,12 +56,12 @@ imx_dma_config_burstlen(int channel, unsigned int burstlen); | |||
54 | int | 56 | int |
55 | imx_dma_setup_single(int channel, dma_addr_t dma_address, | 57 | imx_dma_setup_single(int channel, dma_addr_t dma_address, |
56 | unsigned int dma_length, unsigned int dev_addr, | 58 | unsigned int dma_length, unsigned int dev_addr, |
57 | dmamode_t dmamode); | 59 | unsigned int dmamode); |
58 | 60 | ||
59 | int | 61 | int |
60 | imx_dma_setup_sg(int channel, struct scatterlist *sg, | 62 | imx_dma_setup_sg(int channel, struct scatterlist *sg, |
61 | unsigned int sgcount, unsigned int dma_length, | 63 | unsigned int sgcount, unsigned int dma_length, |
62 | unsigned int dev_addr, dmamode_t dmamode); | 64 | unsigned int dev_addr, unsigned int dmamode); |
63 | 65 | ||
64 | int | 66 | int |
65 | imx_dma_setup_handlers(int channel, | 67 | imx_dma_setup_handlers(int channel, |