Linux Kernel
3.7.1
|
#include <linux/device.h>
#include <linux/uio.h>
#include <linux/bug.h>
#include <linux/scatterlist.h>
#include <linux/bitmap.h>
#include <linux/types.h>
#include <asm/page.h>
Go to the source code of this file.
Data Structures | |
struct | data_chunk |
struct | dma_interleaved_template |
struct | dma_cap_mask_t |
struct | dma_chan_percpu |
struct | dma_chan |
struct | dma_chan_dev |
struct | dma_slave_config |
struct | dma_async_tx_descriptor |
struct | dma_tx_state |
struct | dma_device |
struct | dma_page_list |
struct | dma_pinned_list |
Macros | |
#define | DMA_MIN_COOKIE 1 |
#define | DMA_MAX_COOKIE INT_MAX |
#define | dma_submit_error(cookie) ((cookie) < 0 ? 1 : 0) |
#define | DMA_HAS_PQ_CONTINUE (1 << 15) |
#define | first_dma_cap(mask) __first_dma_cap(&(mask)) |
#define | next_dma_cap(n, mask) __next_dma_cap((n), &(mask)) |
#define | dma_cap_set(tx, mask) __dma_cap_set((tx), &(mask)) |
#define | dma_cap_clear(tx, mask) __dma_cap_clear((tx), &(mask)) |
#define | dma_cap_zero(mask) __dma_cap_zero(&(mask)) |
#define | dma_has_cap(tx, mask) __dma_has_cap((tx), &(mask)) |
#define | for_each_dma_cap_mask(cap, mask) |
#define | dma_async_memcpy_issue_pending(chan) dma_async_issue_pending(chan) |
#define | dma_async_memcpy_complete(chan, cookie, last, used) dma_async_is_tx_complete(chan, cookie, last, used) |
#define | dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y) |
Typedefs | |
typedef s32 | dma_cookie_t |
typedef bool(* | dma_filter_fn )(struct dma_chan *chan, void *filter_param) |
typedef void(* | dma_async_tx_callback )(void *dma_async_param) |
#define dma_async_memcpy_complete | ( | chan, | |
cookie, | |||
last, | |||
used | |||
) | dma_async_is_tx_complete(chan, cookie, last, used) |
Definition at line 937 of file dmaengine.h.
Definition at line 910 of file dmaengine.h.
Definition at line 873 of file dmaengine.h.
Definition at line 866 of file dmaengine.h.
Definition at line 880 of file dmaengine.h.
Definition at line 886 of file dmaengine.h.
#define DMA_HAS_PQ_CONTINUE (1 << 15) |
Definition at line 551 of file dmaengine.h.
#define DMA_MAX_COOKIE INT_MAX |
Definition at line 39 of file dmaengine.h.
#define DMA_MIN_COOKIE 1 |
Definition at line 38 of file dmaengine.h.
Definition at line 1003 of file dmaengine.h.
Definition at line 41 of file dmaengine.h.
Definition at line 852 of file dmaengine.h.
Definition at line 893 of file dmaengine.h.
Definition at line 859 of file dmaengine.h.
Definition at line 394 of file dmaengine.h.
typedef s32 dma_cookie_t |
typedef dma_cookie_t - an opaque DMA cookie
if dma_cookie_t is >0 it's a DMA request cookie, <0 it's an error code
Definition at line 37 of file dmaengine.h.
typedef dma_filter_fn - callback filter for dma_request_channel : channel to be reviewed : opaque parameter passed through dma_request_channel
When this optional parameter is specified in a call to dma_request_channel a suitable channel is passed to this routine for further dispositioning before being returned. Where 'suitable' indicates a non-busy channel that satisfies the given capability mask. It returns 'true' to indicate that the channel is suitable.
Definition at line 392 of file dmaengine.h.
enum dma_ctrl_cmd |
enum dma_ctrl_cmd - DMA operations that can optionally be exercised on a running channel. : terminate all ongoing transfers : pause ongoing transfers : resume paused transfer : this command is only implemented by DMA controllers that need to runtime reconfigure the slave channels (as opposed to passing configuration data in statically from the platform). An additional argument of struct dma_slave_config must be passed in with this command. : this command will put the Freescale DMA controller into external start mode.
Definition at line 213 of file dmaengine.h.
enum dma_ctrl_flags |
enum dma_ctrl_flags - DMA flags to augment operation preparation, control completion, and communicate status. - trigger an interrupt (callback) upon completion of this transaction - if clear, the descriptor cannot be reused until the client acknowledges receipt, i.e. has has a chance to establish any dependency chains - set to disable dma-unmapping the source buffer(s) - set to disable dma-unmapping the destination(s) - set to do the source dma-unmapping as single (if not set, do the source dma-unmapping as page) - set to do the destination dma-unmapping as single (if not set, do the destination dma-unmapping as page) - prevent generation of P while generating Q - prevent generation of Q while generating P - indicate to a driver that it is reusing buffers as sources that were the result of a previous operation, in the case of a PQ operation it continues the calculation with new sources - tell the driver that subsequent operations depend on the result of this operation
Definition at line 186 of file dmaengine.h.
enum dma_slave_buswidth |
enum dma_slave_buswidth - defines bus with of the DMA slave device, source or target buses
DMA_SLAVE_BUSWIDTH_UNDEFINED | |
DMA_SLAVE_BUSWIDTH_1_BYTE | |
DMA_SLAVE_BUSWIDTH_2_BYTES | |
DMA_SLAVE_BUSWIDTH_4_BYTES | |
DMA_SLAVE_BUSWIDTH_8_BYTES |
Definition at line 305 of file dmaengine.h.
enum dma_status |
enum dma_status - DMA transaction status : transaction completed successfully : transaction not yet processed : transaction is paused : transaction failed
Definition at line 50 of file dmaengine.h.
enum dma_transaction_type |
enum dma_transaction_type - DMA transaction types/indexes
Note: The DMA_ASYNC_TX capability is not to be set by drivers. It is automatically set as dma devices are registered.
DMA_MEMCPY | |
DMA_XOR | |
DMA_PQ | |
DMA_XOR_VAL | |
DMA_PQ_VAL | |
DMA_MEMSET | |
DMA_INTERRUPT | |
DMA_SG | |
DMA_PRIVATE | |
DMA_ASYNC_TX | |
DMA_SLAVE | |
DMA_CYCLIC | |
DMA_INTERLEAVE | |
DMA_TX_TYPE_END |
Definition at line 63 of file dmaengine.h.
enum dma_transfer_direction - dma transfer mode and direction indicator : Async/Memcpy mode : Slave mode & From Memory to Device : Slave mode & From Device to Memory : Slave mode & From Device to Device
Definition at line 88 of file dmaengine.h.
enum sum_check_bits |
enum sum_check_bits - bit position of pq_check_flags
Definition at line 224 of file dmaengine.h.
enum sum_check_flags |
enum pq_check_flags - result of async_{xor,pq}_zero_sum operations - 1 if xor zero sum error, 0 otherwise - 1 if reed-solomon zero sum error, 0 otherwise
Definition at line 234 of file dmaengine.h.
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.
|
read |
dma_find_channel - find a channel to carry out the operation : transaction type
Definition at line 331 of file dmaengine.c.
dma_cookie_t dma_memcpy_to_iovec | ( | struct dma_chan * | chan, |
struct iovec * | iov, | ||
struct dma_pinned_list * | pinned_list, | ||
unsigned char * | kdata, | ||
size_t | len | ||
) |
|
read |
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.
void dma_unpin_iovec_pages | ( | struct dma_pinned_list * | pinned_list | ) |
Definition at line 341 of file dmaengine.c.