Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
dma_slave_config Struct Reference

#include <dmaengine.h>

Data Fields

enum dma_transfer_direction direction
 
dma_addr_t src_addr
 
dma_addr_t dst_addr
 
enum dma_slave_buswidth src_addr_width
 
enum dma_slave_buswidth dst_addr_width
 
u32 src_maxburst
 
u32 dst_maxburst
 
bool device_fc
 
unsigned int slave_id
 

Detailed Description

struct dma_slave_config - dma slave channel runtime config : whether the data shall go in or out on this slave channel, right now. DMA_TO_DEVICE and DMA_FROM_DEVICE are legal values, DMA_BIDIRECTIONAL is not acceptable since we need to differentiate source and target addresses. : this is the physical address where DMA slave data should be read (RX), if the source is memory this argument is ignored. : this is the physical address where DMA slave data should be written (TX), if the source is memory this argument is ignored. : this is the width in bytes of the source (RX) register where DMA data shall be read. If the source is memory this may be ignored depending on architecture. Legal values: 1, 2, 4, 8. : same as src_addr_width but for destination target (TX) mutatis mutandis. : the maximum number of words (note: words, as in units of the src_addr_width member, not bytes) that can be sent in one burst to the device. Typically something like half the FIFO depth on I/O peripherals so you don't overflow it. This may or may not be applicable on memory sources. : same as src_maxburst but for destination target mutatis mutandis. : Flow Controller Settings. Only valid for slave channels. Fill with 'true' if peripheral should be flow controller. Direction will be selected at Runtime. : Slave requester id. Only valid for slave channels. The dma slave peripheral will have unique id as dma requester which need to be pass as slave config.

This struct is passed in as configuration data to a DMA engine in order to set up a certain channel for DMA transport at runtime. The DMA device/engine has to provide support for an additional command in the channel config interface, DMA_SLAVE_CONFIG and this struct will then be passed in as an argument to the DMA engine device_control() function.

The rationale for adding configuration information to this struct is as follows: if it is likely that most DMA slave controllers in the world will support the configuration option, then make it generic. If not: if it is fixed so that it be sent in static from the platform data, then prefer to do that. Else, if it is neither fixed at runtime, nor generic enough (such as bus mastership on some CPU family and whatnot) then create a custom slave config struct and pass that, then make this config a member of that struct, if applicable.

Definition at line 362 of file dmaengine.h.

Field Documentation

bool device_fc

Definition at line 370 of file dmaengine.h.

Definition at line 363 of file dmaengine.h.

dma_addr_t dst_addr

Definition at line 365 of file dmaengine.h.

enum dma_slave_buswidth dst_addr_width

Definition at line 367 of file dmaengine.h.

u32 dst_maxburst

Definition at line 369 of file dmaengine.h.

unsigned int slave_id

Definition at line 371 of file dmaengine.h.

dma_addr_t src_addr

Definition at line 364 of file dmaengine.h.

enum dma_slave_buswidth src_addr_width

Definition at line 366 of file dmaengine.h.

u32 src_maxburst

Definition at line 368 of file dmaengine.h.


The documentation for this struct was generated from the following file: