[ARM] 5414/2: ep93xx m2p dma core
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / arm / mach-ep93xx / include / mach / dma.h
blobef6bd9d1314806fe9e0987e2861099314583c732
1 #ifndef __ASM_ARCH_DMA_H
2 #define __ASM_ARCH_DMA_H
4 #include <linux/list.h>
5 #include <linux/types.h>
7 struct ep93xx_dma_buffer {
8 struct list_head list;
9 u32 bus_addr;
10 u16 size;
13 struct ep93xx_dma_m2p_client {
14 char *name;
15 u8 flags;
16 void *cookie;
17 void (*buffer_started)(void *cookie,
18 struct ep93xx_dma_buffer *buf);
19 void (*buffer_finished)(void *cookie,
20 struct ep93xx_dma_buffer *buf,
21 int bytes, int error);
23 /* Internal to the DMA code. */
24 void *channel;
27 #define EP93XX_DMA_M2P_PORT_I2S1 0x00
28 #define EP93XX_DMA_M2P_PORT_I2S2 0x01
29 #define EP93XX_DMA_M2P_PORT_AAC1 0x02
30 #define EP93XX_DMA_M2P_PORT_AAC2 0x03
31 #define EP93XX_DMA_M2P_PORT_AAC3 0x04
32 #define EP93XX_DMA_M2P_PORT_I2S3 0x05
33 #define EP93XX_DMA_M2P_PORT_UART1 0x06
34 #define EP93XX_DMA_M2P_PORT_UART2 0x07
35 #define EP93XX_DMA_M2P_PORT_UART3 0x08
36 #define EP93XX_DMA_M2P_PORT_IRDA 0x09
37 #define EP93XX_DMA_M2P_PORT_MASK 0x0f
38 #define EP93XX_DMA_M2P_TX 0x00
39 #define EP93XX_DMA_M2P_RX 0x10
40 #define EP93XX_DMA_M2P_ABORT_ON_ERROR 0x20
41 #define EP93XX_DMA_M2P_IGNORE_ERROR 0x40
42 #define EP93XX_DMA_M2P_ERROR_MASK 0x60
44 int ep93xx_dma_m2p_client_register(struct ep93xx_dma_m2p_client *m2p);
45 void ep93xx_dma_m2p_client_unregister(struct ep93xx_dma_m2p_client *m2p);
46 void ep93xx_dma_m2p_submit(struct ep93xx_dma_m2p_client *m2p,
47 struct ep93xx_dma_buffer *buf);
48 void ep93xx_dma_m2p_submit_recursive(struct ep93xx_dma_m2p_client *m2p,
49 struct ep93xx_dma_buffer *buf);
50 void ep93xx_dma_m2p_flush(struct ep93xx_dma_m2p_client *m2p);
52 #endif /* __ASM_ARCH_DMA_H */