RT-AC56 3.0.0.4.374.37 core
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / arm / mach-ep93xx / include / mach / dma.h
blob3a5961d3f3b1bf810c8d7d8369132fc64fcee54e
1 /*
2 * arch/arm/mach-ep93xx/include/mach/dma.h
3 */
5 #ifndef __ASM_ARCH_DMA_H
6 #define __ASM_ARCH_DMA_H
8 #include <linux/list.h>
9 #include <linux/types.h>
11 struct ep93xx_dma_buffer {
12 struct list_head list;
13 u32 bus_addr;
14 u16 size;
17 struct ep93xx_dma_m2p_client {
18 char *name;
19 u8 flags;
20 void *cookie;
21 void (*buffer_started)(void *cookie,
22 struct ep93xx_dma_buffer *buf);
23 void (*buffer_finished)(void *cookie,
24 struct ep93xx_dma_buffer *buf,
25 int bytes, int error);
27 /* Internal to the DMA code. */
28 void *channel;
31 #define EP93XX_DMA_M2P_PORT_I2S1 0x00
32 #define EP93XX_DMA_M2P_PORT_I2S2 0x01
33 #define EP93XX_DMA_M2P_PORT_AAC1 0x02
34 #define EP93XX_DMA_M2P_PORT_AAC2 0x03
35 #define EP93XX_DMA_M2P_PORT_AAC3 0x04
36 #define EP93XX_DMA_M2P_PORT_I2S3 0x05
37 #define EP93XX_DMA_M2P_PORT_UART1 0x06
38 #define EP93XX_DMA_M2P_PORT_UART2 0x07
39 #define EP93XX_DMA_M2P_PORT_UART3 0x08
40 #define EP93XX_DMA_M2P_PORT_IRDA 0x09
41 #define EP93XX_DMA_M2P_PORT_MASK 0x0f
42 #define EP93XX_DMA_M2P_TX 0x00
43 #define EP93XX_DMA_M2P_RX 0x10
44 #define EP93XX_DMA_M2P_ABORT_ON_ERROR 0x20
45 #define EP93XX_DMA_M2P_IGNORE_ERROR 0x40
46 #define EP93XX_DMA_M2P_ERROR_MASK 0x60
48 int ep93xx_dma_m2p_client_register(struct ep93xx_dma_m2p_client *m2p);
49 void ep93xx_dma_m2p_client_unregister(struct ep93xx_dma_m2p_client *m2p);
50 void ep93xx_dma_m2p_submit(struct ep93xx_dma_m2p_client *m2p,
51 struct ep93xx_dma_buffer *buf);
52 void ep93xx_dma_m2p_submit_recursive(struct ep93xx_dma_m2p_client *m2p,
53 struct ep93xx_dma_buffer *buf);
54 void ep93xx_dma_m2p_flush(struct ep93xx_dma_m2p_client *m2p);
56 #endif /* __ASM_ARCH_DMA_H */