Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
dmaengine.c File Reference
#include <linux/dma-mapping.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/device.h>
#include <linux/dmaengine.h>
#include <linux/hardirq.h>
#include <linux/spinlock.h>
#include <linux/percpu.h>
#include <linux/rcupdate.h>
#include <linux/mutex.h>
#include <linux/jiffies.h>
#include <linux/rculist.h>
#include <linux/idr.h>
#include <linux/slab.h>

Go to the source code of this file.

Data Structures

struct  dma_chan_tbl_ent
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define dma_device_satisfies_mask(device, mask)   __dma_device_satisfies_mask((device), &(mask))
 

Functions

enum dma_status dma_sync_wait (struct dma_chan *chan, dma_cookie_t cookie)
 
 EXPORT_SYMBOL (dma_sync_wait)
 
 arch_initcall (dma_channel_table_init)
 
struct dma_chandma_find_channel (enum dma_transaction_type tx_type)
 
 EXPORT_SYMBOL (dma_find_channel)
 
struct dma_channet_dma_find_channel (void)
 
 EXPORT_SYMBOL (net_dma_find_channel)
 
void dma_issue_pending_all (void)
 
 EXPORT_SYMBOL (dma_issue_pending_all)
 
struct dma_chan__dma_request_channel (dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param)
 
 EXPORT_SYMBOL_GPL (__dma_request_channel)
 
void dma_release_channel (struct dma_chan *chan)
 
 EXPORT_SYMBOL_GPL (dma_release_channel)
 
void dmaengine_get (void)
 
 EXPORT_SYMBOL (dmaengine_get)
 
void dmaengine_put (void)
 
 EXPORT_SYMBOL (dmaengine_put)
 
int dma_async_device_register (struct dma_device *device)
 
 EXPORT_SYMBOL (dma_async_device_register)
 
void dma_async_device_unregister (struct dma_device *device)
 
 EXPORT_SYMBOL (dma_async_device_unregister)
 
dma_cookie_t dma_async_memcpy_buf_to_buf (struct dma_chan *chan, void *dest, void *src, size_t len)
 
 EXPORT_SYMBOL (dma_async_memcpy_buf_to_buf)
 
dma_cookie_t dma_async_memcpy_buf_to_pg (struct dma_chan *chan, struct page *page, unsigned int offset, void *kdata, size_t len)
 
 EXPORT_SYMBOL (dma_async_memcpy_buf_to_pg)
 
dma_cookie_t dma_async_memcpy_pg_to_pg (struct dma_chan *chan, struct page *dest_pg, unsigned int dest_off, struct page *src_pg, unsigned int src_off, size_t len)
 
 EXPORT_SYMBOL (dma_async_memcpy_pg_to_pg)
 
void dma_async_tx_descriptor_init (struct dma_async_tx_descriptor *tx, struct dma_chan *chan)
 
 EXPORT_SYMBOL (dma_async_tx_descriptor_init)
 
enum dma_status dma_wait_for_async_tx (struct dma_async_tx_descriptor *tx)
 
 EXPORT_SYMBOL_GPL (dma_wait_for_async_tx)
 
void dma_run_dependencies (struct dma_async_tx_descriptor *tx)
 
 EXPORT_SYMBOL_GPL (dma_run_dependencies)
 
 arch_initcall (dma_bus_init)
 

Macro Definition Documentation

#define dma_device_satisfies_mask (   device,
  mask 
)    __dma_device_satisfies_mask((device), &(mask))

Definition at line 173 of file dmaengine.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 48 of file dmaengine.c.

Function Documentation

struct dma_chan* __dma_request_channel ( dma_cap_mask_t mask,
dma_filter_fn  fn,
void fn_param 
)
read

Definition at line 504 of file dmaengine.c.

arch_initcall ( dma_channel_table_init  )
arch_initcall ( dma_bus_init  )
int dma_async_device_register ( struct dma_device device)

dma_async_device_register - registers DMA devices found : &dma_device

Definition at line 688 of file dmaengine.c.

void dma_async_device_unregister ( struct dma_device device)

dma_async_device_unregister - unregister a DMA device : &dma_device

This routine is called by dma driver exit routines, dmaengine holds module references to prevent it being called while channels are in use.

Definition at line 834 of file dmaengine.c.

dma_cookie_t dma_async_memcpy_buf_to_buf ( struct dma_chan chan,
void dest,
void src,
size_t  len 
)

dma_async_memcpy_buf_to_buf - offloaded copy between virtual addresses : DMA channel to offload copy to : destination address (virtual) : source address (virtual) : length

Both and must be mappable to a bus address according to the DMA mapping API rules for streaming mappings. Both and must stay memory resident (kernel memory or locked user space pages).

Definition at line 869 of file dmaengine.c.

dma_cookie_t dma_async_memcpy_buf_to_pg ( struct dma_chan chan,
struct page page,
unsigned int  offset,
void kdata,
size_t  len 
)

Definition at line 917 of file dmaengine.c.

dma_cookie_t dma_async_memcpy_pg_to_pg ( struct dma_chan chan,
struct page dest_pg,
unsigned int  dest_off,
struct page src_pg,
unsigned int  src_off,
size_t  len 
)

dma_async_memcpy_pg_to_pg - offloaded copy from page to page : DMA channel to offload copy to : destination page : offset in page to copy to : source page : offset in page to copy from : length

Both / and / must be mappable to a bus address according to the DMA mapping API rules for streaming mappings. Both / and / must stay memory resident (kernel memory or locked user space pages).

Definition at line 964 of file dmaengine.c.

void dma_async_tx_descriptor_init ( struct dma_async_tx_descriptor tx,
struct dma_chan chan 
)

Definition at line 998 of file dmaengine.c.

struct dma_chan* dma_find_channel ( enum dma_transaction_type  tx_type)
read

dma_find_channel - find a channel to carry out the operation : transaction type

Definition at line 331 of file dmaengine.c.

void dma_issue_pending_all ( void  )

dma_issue_pending_all - flush all pending operations across all channels

Definition at line 354 of file dmaengine.c.

void dma_release_channel ( struct dma_chan chan)

Definition at line 549 of file dmaengine.c.

void dma_run_dependencies ( struct dma_async_tx_descriptor tx)

Definition at line 1035 of file dmaengine.c.

enum dma_status dma_sync_wait ( struct dma_chan chan,
dma_cookie_t  cookie 
)

Definition at line 257 of file dmaengine.c.

enum dma_status dma_wait_for_async_tx ( struct dma_async_tx_descriptor tx)

Definition at line 1012 of file dmaengine.c.

void dmaengine_get ( void  )

dmaengine_get - register interest in dma_channels

Definition at line 565 of file dmaengine.c.

void dmaengine_put ( void  )

dmaengine_put - let dma drivers be removed when ref_count == 0

Definition at line 603 of file dmaengine.c.

EXPORT_SYMBOL ( dma_sync_wait  )
EXPORT_SYMBOL ( dma_find_channel  )
EXPORT_SYMBOL ( net_dma_find_channel  )
EXPORT_SYMBOL ( dma_issue_pending_all  )
EXPORT_SYMBOL ( dmaengine_get  )
EXPORT_SYMBOL ( dmaengine_put  )
EXPORT_SYMBOL ( dma_async_device_register  )
EXPORT_SYMBOL ( dma_async_device_unregister  )
EXPORT_SYMBOL ( dma_async_memcpy_buf_to_buf  )
EXPORT_SYMBOL ( dma_async_memcpy_buf_to_pg  )
EXPORT_SYMBOL ( dma_async_memcpy_pg_to_pg  )
EXPORT_SYMBOL ( dma_async_tx_descriptor_init  )
EXPORT_SYMBOL_GPL ( __dma_request_channel  )
EXPORT_SYMBOL_GPL ( dma_release_channel  )
EXPORT_SYMBOL_GPL ( dma_wait_for_async_tx  )
EXPORT_SYMBOL_GPL ( dma_run_dependencies  )
struct dma_chan* net_dma_find_channel ( void  )
read

Definition at line 341 of file dmaengine.c.