aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-mxc
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2008-12-16 06:17:47 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2008-12-16 06:17:47 -0500
commit33ebc19d5448aadb2ce4a865d7118f1c2f23fafe (patch)
tree1240902d096daa9635cf1c43c1204737bb7c9fcb /arch/arm/plat-mxc
parent7e1548a597ef7e26d5d62f8be3be6da9e101b26c (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.c7
-rw-r--r--arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h10
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)
193int 192int
194imx_dma_setup_single(int channel, dma_addr_t dma_address, 193imx_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
288imx_dma_setup_sg(int channel, 287imx_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);
54int 56int
55imx_dma_setup_single(int channel, dma_addr_t dma_address, 57imx_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
59int 61int
60imx_dma_setup_sg(int channel, struct scatterlist *sg, 62imx_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
64int 66int
65imx_dma_setup_handlers(int channel, 67imx_dma_setup_handlers(int channel,