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

Go to the source code of this file.

Data Structures

struct  cpdma_params
 
struct  cpdma_chan_stats
 

Macros

#define CPDMA_MAX_CHANNELS   BITS_PER_LONG
 
#define tx_chan_num(chan)   (chan)
 
#define rx_chan_num(chan)   ((chan) + CPDMA_MAX_CHANNELS)
 
#define is_rx_chan(chan)   ((chan)->chan_num >= CPDMA_MAX_CHANNELS)
 
#define is_tx_chan(chan)   (!is_rx_chan(chan))
 
#define __chan_linear(chan_num)   ((chan_num) & (CPDMA_MAX_CHANNELS - 1))
 
#define chan_linear(chan)   __chan_linear((chan)->chan_num)
 

Typedefs

typedef void(* cpdma_handler_fn )(void *token, int len, int status)
 

Enumerations

enum  cpdma_control {
  CPDMA_CMD_IDLE, CPDMA_COPY_ERROR_FRAMES, CPDMA_RX_OFF_LEN_UPDATE, CPDMA_RX_OWNERSHIP_FLIP,
  CPDMA_TX_PRIO_FIXED, CPDMA_STAT_IDLE, CPDMA_STAT_TX_ERR_CHAN, CPDMA_STAT_TX_ERR_CODE,
  CPDMA_STAT_RX_ERR_CHAN, CPDMA_STAT_RX_ERR_CODE, CPDMA_RX_BUFFER_OFFSET
}
 

Functions

struct cpdma_ctlrcpdma_ctlr_create (struct cpdma_params *params)
 
int cpdma_ctlr_destroy (struct cpdma_ctlr *ctlr)
 
int cpdma_ctlr_start (struct cpdma_ctlr *ctlr)
 
int cpdma_ctlr_stop (struct cpdma_ctlr *ctlr)
 
int cpdma_ctlr_dump (struct cpdma_ctlr *ctlr)
 
struct cpdma_chancpdma_chan_create (struct cpdma_ctlr *ctlr, int chan_num, cpdma_handler_fn handler)
 
int cpdma_chan_destroy (struct cpdma_chan *chan)
 
int cpdma_chan_start (struct cpdma_chan *chan)
 
int cpdma_chan_stop (struct cpdma_chan *chan)
 
int cpdma_chan_dump (struct cpdma_chan *chan)
 
int cpdma_chan_get_stats (struct cpdma_chan *chan, struct cpdma_chan_stats *stats)
 
int cpdma_chan_submit (struct cpdma_chan *chan, void *token, void *data, int len, gfp_t gfp_mask)
 
int cpdma_chan_process (struct cpdma_chan *chan, int quota)
 
int cpdma_ctlr_int_ctrl (struct cpdma_ctlr *ctlr, bool enable)
 
void cpdma_ctlr_eoi (struct cpdma_ctlr *ctlr)
 
int cpdma_chan_int_ctrl (struct cpdma_chan *chan, bool enable)
 
int cpdma_control_get (struct cpdma_ctlr *ctlr, int control)
 
int cpdma_control_set (struct cpdma_ctlr *ctlr, int control, int value)
 

Macro Definition Documentation

#define __chan_linear (   chan_num)    ((chan_num) & (CPDMA_MAX_CHANNELS - 1))

Definition at line 24 of file davinci_cpdma.h.

#define chan_linear (   chan)    __chan_linear((chan)->chan_num)

Definition at line 25 of file davinci_cpdma.h.

#define CPDMA_MAX_CHANNELS   BITS_PER_LONG

Definition at line 18 of file davinci_cpdma.h.

#define is_rx_chan (   chan)    ((chan)->chan_num >= CPDMA_MAX_CHANNELS)

Definition at line 22 of file davinci_cpdma.h.

#define is_tx_chan (   chan)    (!is_rx_chan(chan))

Definition at line 23 of file davinci_cpdma.h.

#define rx_chan_num (   chan)    ((chan) + CPDMA_MAX_CHANNELS)

Definition at line 21 of file davinci_cpdma.h.

#define tx_chan_num (   chan)    (chan)

Definition at line 20 of file davinci_cpdma.h.

Typedef Documentation

typedef void(* cpdma_handler_fn)(void *token, int len, int status)

Definition at line 67 of file davinci_cpdma.h.

Enumeration Type Documentation

Enumerator:
CPDMA_CMD_IDLE 
CPDMA_COPY_ERROR_FRAMES 
CPDMA_RX_OFF_LEN_UPDATE 
CPDMA_RX_OWNERSHIP_FLIP 
CPDMA_TX_PRIO_FIXED 
CPDMA_STAT_IDLE 
CPDMA_STAT_TX_ERR_CHAN 
CPDMA_STAT_TX_ERR_CODE 
CPDMA_STAT_RX_ERR_CHAN 
CPDMA_STAT_RX_ERR_CODE 
CPDMA_RX_BUFFER_OFFSET 

Definition at line 92 of file davinci_cpdma.h.

Function Documentation

struct cpdma_chan* cpdma_chan_create ( struct cpdma_ctlr ctlr,
int  chan_num,
cpdma_handler_fn  handler 
)
read

Definition at line 482 of file davinci_cpdma.c.

int cpdma_chan_destroy ( struct cpdma_chan chan)

Definition at line 539 of file davinci_cpdma.c.

int cpdma_chan_dump ( struct cpdma_chan chan)

Definition at line 570 of file davinci_cpdma.c.

int cpdma_chan_get_stats ( struct cpdma_chan chan,
struct cpdma_chan_stats stats 
)

Definition at line 558 of file davinci_cpdma.c.

int cpdma_chan_int_ctrl ( struct cpdma_chan chan,
bool  enable 
)

Definition at line 881 of file davinci_cpdma.c.

int cpdma_chan_process ( struct cpdma_chan chan,
int  quota 
)

Definition at line 774 of file davinci_cpdma.c.

int cpdma_chan_start ( struct cpdma_chan chan)

Definition at line 791 of file davinci_cpdma.c.

int cpdma_chan_stop ( struct cpdma_chan chan)

Definition at line 819 of file davinci_cpdma.c.

int cpdma_chan_submit ( struct cpdma_chan chan,
void token,
void data,
int  len,
gfp_t  gfp_mask 
)

Definition at line 654 of file davinci_cpdma.c.

int cpdma_control_get ( struct cpdma_ctlr ctlr,
int  control 
)

Definition at line 921 of file davinci_cpdma.c.

int cpdma_control_set ( struct cpdma_ctlr ctlr,
int  control,
int  value 
)

Definition at line 952 of file davinci_cpdma.c.

struct cpdma_ctlr* cpdma_ctlr_create ( struct cpdma_params params)
read

Definition at line 253 of file davinci_cpdma.c.

int cpdma_ctlr_destroy ( struct cpdma_ctlr ctlr)

Definition at line 430 of file davinci_cpdma.c.

int cpdma_ctlr_dump ( struct cpdma_ctlr ctlr)

Definition at line 359 of file davinci_cpdma.c.

void cpdma_ctlr_eoi ( struct cpdma_ctlr ctlr)

Definition at line 477 of file davinci_cpdma.c.

int cpdma_ctlr_int_ctrl ( struct cpdma_ctlr ctlr,
bool  enable 
)

Definition at line 454 of file davinci_cpdma.c.

int cpdma_ctlr_start ( struct cpdma_ctlr ctlr)

Definition at line 282 of file davinci_cpdma.c.

int cpdma_ctlr_stop ( struct cpdma_ctlr ctlr)

Definition at line 328 of file davinci_cpdma.c.