Commit 33ebc19d authored by Sascha Hauer's avatar Sascha Hauer

[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: default avatarSascha Hauer <s.hauer@pengutronix.de>
parent 7e1548a5
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <asm/system.h> #include <asm/system.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/dma.h>
#include <mach/dma-mx1-mx2.h> #include <mach/dma-mx1-mx2.h>
#define DMA_DCR 0x00 /* Control Register */ #define DMA_DCR 0x00 /* Control Register */
...@@ -114,7 +113,7 @@ struct imx_dma_channel { ...@@ -114,7 +113,7 @@ struct imx_dma_channel {
void (*err_handler) (int, void *, int errcode); void (*err_handler) (int, void *, int errcode);
void (*prog_handler) (int, void *, struct scatterlist *); void (*prog_handler) (int, void *, struct scatterlist *);
void *data; void *data;
dmamode_t dma_mode; unsigned int dma_mode;
struct scatterlist *sg; struct scatterlist *sg;
unsigned int resbytes; unsigned int resbytes;
int dma_num; int dma_num;
...@@ -193,7 +192,7 @@ static inline int imx_dma_sg_next(int channel, struct scatterlist *sg) ...@@ -193,7 +192,7 @@ static inline int imx_dma_sg_next(int channel, struct scatterlist *sg)
int int
imx_dma_setup_single(int channel, dma_addr_t dma_address, imx_dma_setup_single(int channel, dma_addr_t dma_address,
unsigned int dma_length, unsigned int dev_addr, unsigned int dma_length, unsigned int dev_addr,
dmamode_t dmamode) unsigned int dmamode)
{ {
struct imx_dma_channel *imxdma = &imx_dma_channels[channel]; struct imx_dma_channel *imxdma = &imx_dma_channels[channel];
...@@ -288,7 +287,7 @@ int ...@@ -288,7 +287,7 @@ int
imx_dma_setup_sg(int channel, imx_dma_setup_sg(int channel,
struct scatterlist *sg, unsigned int sgcount, struct scatterlist *sg, unsigned int sgcount,
unsigned int dma_length, unsigned int dev_addr, unsigned int dma_length, unsigned int dev_addr,
dmamode_t dmamode) unsigned int dmamode)
{ {
struct imx_dma_channel *imxdma = &imx_dma_channels[channel]; struct imx_dma_channel *imxdma = &imx_dma_channels[channel];
......
...@@ -22,13 +22,15 @@ ...@@ -22,13 +22,15 @@
* MA 02110-1301, USA. * MA 02110-1301, USA.
*/ */
#include <mach/dma.h>
#ifndef __ASM_ARCH_MXC_DMA_H #ifndef __ASM_ARCH_MXC_DMA_H
#define __ASM_ARCH_MXC_DMA_H #define __ASM_ARCH_MXC_DMA_H
#define IMX_DMA_CHANNELS 16 #define IMX_DMA_CHANNELS 16
#define DMA_MODE_READ 0
#define DMA_MODE_WRITE 1
#define DMA_MODE_MASK 1
#define DMA_BASE IO_ADDRESS(DMA_BASE_ADDR) #define DMA_BASE IO_ADDRESS(DMA_BASE_ADDR)
#define IMX_DMA_MEMSIZE_32 (0 << 4) #define IMX_DMA_MEMSIZE_32 (0 << 4)
...@@ -54,12 +56,12 @@ imx_dma_config_burstlen(int channel, unsigned int burstlen); ...@@ -54,12 +56,12 @@ imx_dma_config_burstlen(int channel, unsigned int burstlen);
int int
imx_dma_setup_single(int channel, dma_addr_t dma_address, imx_dma_setup_single(int channel, dma_addr_t dma_address,
unsigned int dma_length, unsigned int dev_addr, unsigned int dma_length, unsigned int dev_addr,
dmamode_t dmamode); unsigned int dmamode);
int int
imx_dma_setup_sg(int channel, struct scatterlist *sg, imx_dma_setup_sg(int channel, struct scatterlist *sg,
unsigned int sgcount, unsigned int dma_length, unsigned int sgcount, unsigned int dma_length,
unsigned int dev_addr, dmamode_t dmamode); unsigned int dev_addr, unsigned int dmamode);
int int
imx_dma_setup_handlers(int channel, imx_dma_setup_handlers(int channel,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment