linux/arch/arm/mach-ep93xx/include/mach/dma.h
<<
>>
Prefs
   1#ifndef __ASM_ARCH_DMA_H
   2#define __ASM_ARCH_DMA_H
   3
   4#include <linux/list.h>
   5#include <linux/types.h>
   6
   7struct ep93xx_dma_buffer {
   8        struct list_head        list;
   9        u32                     bus_addr;
  10        u16                     size;
  11};
  12
  13struct 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);
  22
  23        /* Internal to the DMA code.  */
  24        void                    *channel;
  25};
  26
  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
  43
  44int  ep93xx_dma_m2p_client_register(struct ep93xx_dma_m2p_client *m2p);
  45void ep93xx_dma_m2p_client_unregister(struct ep93xx_dma_m2p_client *m2p);
  46void ep93xx_dma_m2p_submit(struct ep93xx_dma_m2p_client *m2p,
  47                           struct ep93xx_dma_buffer *buf);
  48void ep93xx_dma_m2p_submit_recursive(struct ep93xx_dma_m2p_client *m2p,
  49                                     struct ep93xx_dma_buffer *buf);
  50void ep93xx_dma_m2p_flush(struct ep93xx_dma_m2p_client *m2p);
  51
  52#endif /* __ASM_ARCH_DMA_H */
  53