Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
dma-api.c File Reference
#include <linux/init.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/proc_fs.h>
#include <linux/list.h>
#include <linux/platform_device.h>
#include <linux/mm.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <asm/dma.h>

Go to the source code of this file.

Functions

 DEFINE_SPINLOCK (dma_spin_lock)
 
struct dma_infoget_dma_info (unsigned int chan)
 
 EXPORT_SYMBOL (get_dma_info)
 
struct dma_infoget_dma_info_by_name (const char *dmac_name)
 
 EXPORT_SYMBOL (get_dma_info_by_name)
 
struct dma_channelget_dma_channel (unsigned int chan)
 
 EXPORT_SYMBOL (get_dma_channel)
 
int get_dma_residue (unsigned int chan)
 
 EXPORT_SYMBOL (get_dma_residue)
 
int request_dma_bycap (const char **dmac, const char **caps, const char *dev_id)
 
 EXPORT_SYMBOL (request_dma_bycap)
 
int dmac_search_free_channel (const char *dev_id)
 
int request_dma (unsigned int chan, const char *dev_id)
 
 EXPORT_SYMBOL (request_dma)
 
void free_dma (unsigned int chan)
 
 EXPORT_SYMBOL (free_dma)
 
void dma_wait_for_completion (unsigned int chan)
 
 EXPORT_SYMBOL (dma_wait_for_completion)
 
int register_chan_caps (const char *dmac, struct dma_chan_caps *caps)
 
 EXPORT_SYMBOL (register_chan_caps)
 
void dma_configure_channel (unsigned int chan, unsigned long flags)
 
 EXPORT_SYMBOL (dma_configure_channel)
 
int dma_xfer (unsigned int chan, unsigned long from, unsigned long to, size_t size, unsigned int mode)
 
 EXPORT_SYMBOL (dma_xfer)
 
int dma_extend (unsigned int chan, unsigned long op, void *param)
 
 EXPORT_SYMBOL (dma_extend)
 
int register_dmac (struct dma_info *info)
 
 EXPORT_SYMBOL (register_dmac)
 
void unregister_dmac (struct dma_info *info)
 
 EXPORT_SYMBOL (unregister_dmac)
 
 subsys_initcall (dma_api_init)
 
 MODULE_AUTHOR ("Paul Mundt <[email protected]>")
 
 MODULE_DESCRIPTION ("DMA API for SuperH")
 
 MODULE_LICENSE ("GPL")
 

Function Documentation

DEFINE_SPINLOCK ( dma_spin_lock  )
void dma_configure_channel ( unsigned int  chan,
unsigned long  flags 
)

Definition at line 274 of file dma-api.c.

int dma_extend ( unsigned int  chan,
unsigned long  op,
void param 
)

Definition at line 299 of file dma-api.c.

void dma_wait_for_completion ( unsigned int  chan)

Definition at line 229 of file dma-api.c.

int dma_xfer ( unsigned int  chan,
unsigned long  from,
unsigned long  to,
size_t  size,
unsigned int  mode 
)

Definition at line 284 of file dma-api.c.

int dmac_search_free_channel ( const char dev_id)

Definition at line 166 of file dma-api.c.

EXPORT_SYMBOL ( get_dma_info  )
EXPORT_SYMBOL ( get_dma_info_by_name  )
EXPORT_SYMBOL ( get_dma_channel  )
EXPORT_SYMBOL ( get_dma_residue  )
EXPORT_SYMBOL ( request_dma_bycap  )
EXPORT_SYMBOL ( request_dma  )
EXPORT_SYMBOL ( free_dma  )
EXPORT_SYMBOL ( dma_wait_for_completion  )
EXPORT_SYMBOL ( register_chan_caps  )
EXPORT_SYMBOL ( dma_configure_channel  )
EXPORT_SYMBOL ( dma_xfer  )
EXPORT_SYMBOL ( dma_extend  )
EXPORT_SYMBOL ( register_dmac  )
EXPORT_SYMBOL ( unregister_dmac  )
void free_dma ( unsigned int  chan)

Definition at line 217 of file dma-api.c.

struct dma_channel* get_dma_channel ( unsigned int  chan)
read

Definition at line 75 of file dma-api.c.

struct dma_info* get_dma_info ( unsigned int  chan)
read

Definition at line 26 of file dma-api.c.

struct dma_info* get_dma_info_by_name ( const char dmac_name)
read

Definition at line 46 of file dma-api.c.

int get_dma_residue ( unsigned int  chan)

Definition at line 94 of file dma-api.c.

MODULE_AUTHOR ( "Paul Mundt <[email protected]>"  )
MODULE_DESCRIPTION ( "DMA API for SuperH"  )
MODULE_LICENSE ( "GPL"  )
int register_chan_caps ( const char dmac,
struct dma_chan_caps *  caps 
)

Definition at line 245 of file dma-api.c.

int register_dmac ( struct dma_info info)

Definition at line 343 of file dma-api.c.

int request_dma ( unsigned int  chan,
const char dev_id 
)

request_dma - request a DMA channel

Request the specific DMA channel from the system if it's available.

Definition at line 193 of file dma-api.c.

int request_dma_bycap ( const char **  dmac,
const char **  caps,
const char dev_id 
)

request_dma_bycap - Allocate a DMA channel based on its capabilities : List of DMA controllers to search : List of capabilities

Search all channels of all DMA controllers to find a channel which matches the requested capabilities. The result is the channel number if a match is found, or %-ENODEV if no match is found.

Note that not all DMA controllers export capabilities, in which case they can never be allocated using this API, and so request_dma() must be used specifying the channel number.

Definition at line 130 of file dma-api.c.

subsys_initcall ( dma_api_init  )
void unregister_dmac ( struct dma_info info)

Definition at line 397 of file dma-api.c.