Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Typedefs | Enumerations | Functions
dma.h File Reference

Go to the source code of this file.

Data Structures

struct  jz4740_dma_config
 

Typedefs

typedef void(* jz4740_dma_complete_callback_t )(struct jz4740_dma_chan *, int, void *)
 

Enumerations

enum  jz4740_dma_request_type {
  JZ4740_DMA_TYPE_AUTO_REQUEST = 8, JZ4740_DMA_TYPE_UART_TRANSMIT = 20, JZ4740_DMA_TYPE_UART_RECEIVE = 21, JZ4740_DMA_TYPE_SPI_TRANSMIT = 22,
  JZ4740_DMA_TYPE_SPI_RECEIVE = 23, JZ4740_DMA_TYPE_AIC_TRANSMIT = 24, JZ4740_DMA_TYPE_AIC_RECEIVE = 25, JZ4740_DMA_TYPE_MMC_TRANSMIT = 26,
  JZ4740_DMA_TYPE_MMC_RECEIVE = 27, JZ4740_DMA_TYPE_TCU = 28, JZ4740_DMA_TYPE_SADC = 29, JZ4740_DMA_TYPE_SLCD = 30
}
 
enum  jz4740_dma_width { JZ4740_DMA_WIDTH_32BIT = 0, JZ4740_DMA_WIDTH_8BIT = 1, JZ4740_DMA_WIDTH_16BIT = 2 }
 
enum  jz4740_dma_transfer_size {
  JZ4740_DMA_TRANSFER_SIZE_4BYTE = 0, JZ4740_DMA_TRANSFER_SIZE_1BYTE = 1, JZ4740_DMA_TRANSFER_SIZE_2BYTE = 2, JZ4740_DMA_TRANSFER_SIZE_16BYTE = 3,
  JZ4740_DMA_TRANSFER_SIZE_32BYTE = 4
}
 
enum  jz4740_dma_flags { JZ4740_DMA_SRC_AUTOINC = 0x2, JZ4740_DMA_DST_AUTOINC = 0x1 }
 
enum  jz4740_dma_mode { JZ4740_DMA_MODE_SINGLE = 0, JZ4740_DMA_MODE_BLOCK = 1 }
 

Functions

struct jz4740_dma_chanjz4740_dma_request (void *dev, const char *name)
 
void jz4740_dma_free (struct jz4740_dma_chan *dma)
 
void jz4740_dma_configure (struct jz4740_dma_chan *dma, const struct jz4740_dma_config *config)
 
void jz4740_dma_enable (struct jz4740_dma_chan *dma)
 
void jz4740_dma_disable (struct jz4740_dma_chan *dma)
 
void jz4740_dma_set_src_addr (struct jz4740_dma_chan *dma, dma_addr_t src)
 
void jz4740_dma_set_dst_addr (struct jz4740_dma_chan *dma, dma_addr_t dst)
 
void jz4740_dma_set_transfer_count (struct jz4740_dma_chan *dma, uint32_t count)
 
uint32_t jz4740_dma_get_residue (const struct jz4740_dma_chan *dma)
 
void jz4740_dma_set_complete_cb (struct jz4740_dma_chan *dma, jz4740_dma_complete_callback_t cb)
 

Typedef Documentation

typedef void(* jz4740_dma_complete_callback_t)(struct jz4740_dma_chan *, int, void *)

Definition at line 69 of file dma.h.

Enumeration Type Documentation

Enumerator:
JZ4740_DMA_SRC_AUTOINC 
JZ4740_DMA_DST_AUTOINC 

Definition at line 50 of file dma.h.

Enumerator:
JZ4740_DMA_MODE_SINGLE 
JZ4740_DMA_MODE_BLOCK 

Definition at line 55 of file dma.h.

Enumerator:
JZ4740_DMA_TYPE_AUTO_REQUEST 
JZ4740_DMA_TYPE_UART_TRANSMIT 
JZ4740_DMA_TYPE_UART_RECEIVE 
JZ4740_DMA_TYPE_SPI_TRANSMIT 
JZ4740_DMA_TYPE_SPI_RECEIVE 
JZ4740_DMA_TYPE_AIC_TRANSMIT 
JZ4740_DMA_TYPE_AIC_RECEIVE 
JZ4740_DMA_TYPE_MMC_TRANSMIT 
JZ4740_DMA_TYPE_MMC_RECEIVE 
JZ4740_DMA_TYPE_TCU 
JZ4740_DMA_TYPE_SADC 
JZ4740_DMA_TYPE_SLCD 

Definition at line 21 of file dma.h.

Enumerator:
JZ4740_DMA_TRANSFER_SIZE_4BYTE 
JZ4740_DMA_TRANSFER_SIZE_1BYTE 
JZ4740_DMA_TRANSFER_SIZE_2BYTE 
JZ4740_DMA_TRANSFER_SIZE_16BYTE 
JZ4740_DMA_TRANSFER_SIZE_32BYTE 

Definition at line 42 of file dma.h.

Enumerator:
JZ4740_DMA_WIDTH_32BIT 
JZ4740_DMA_WIDTH_8BIT 
JZ4740_DMA_WIDTH_16BIT 

Definition at line 36 of file dma.h.

Function Documentation

void jz4740_dma_configure ( struct jz4740_dma_chan dma,
const struct jz4740_dma_config config 
)

Definition at line 145 of file dma.c.

void jz4740_dma_disable ( struct jz4740_dma_chan dma)

Definition at line 228 of file dma.c.

void jz4740_dma_enable ( struct jz4740_dma_chan dma)

Definition at line 215 of file dma.c.

void jz4740_dma_free ( struct jz4740_dma_chan dma)

Definition at line 207 of file dma.c.

uint32_t jz4740_dma_get_residue ( const struct jz4740_dma_chan dma)

Definition at line 235 of file dma.c.

struct jz4740_dma_chan* jz4740_dma_request ( void dev,
const char name 
)
read

Definition at line 118 of file dma.c.

void jz4740_dma_set_complete_cb ( struct jz4740_dma_chan dma,
jz4740_dma_complete_callback_t  cb 
)

Definition at line 200 of file dma.c.

void jz4740_dma_set_dst_addr ( struct jz4740_dma_chan dma,
dma_addr_t  dst 
)

Definition at line 187 of file dma.c.

void jz4740_dma_set_src_addr ( struct jz4740_dma_chan dma,
dma_addr_t  src 
)

Definition at line 181 of file dma.c.

void jz4740_dma_set_transfer_count ( struct jz4740_dma_chan dma,
uint32_t  count 
)

Definition at line 193 of file dma.c.