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

Go to the source code of this file.

Data Structures

struct  edmacc_param
 
struct  edma_rsv_info
 
struct  edma_soc_info
 

Macros

#define CCINT0_INTERRUPT   16
 
#define CCERRINT_INTERRUPT   17
 
#define TCERRINT0_INTERRUPT   18
 
#define TCERRINT1_INTERRUPT   19
 
#define SAM   BIT(0)
 
#define DAM   BIT(1)
 
#define SYNCDIM   BIT(2)
 
#define STATIC   BIT(3)
 
#define EDMA_FWID   (0x07 << 8)
 
#define TCCMODE   BIT(11)
 
#define EDMA_TCC(t)   ((t) << 12)
 
#define TCINTEN   BIT(20)
 
#define ITCINTEN   BIT(21)
 
#define TCCHEN   BIT(22)
 
#define ITCCHEN   BIT(23)
 
#define TRWORD   (0x7<<2)
 
#define PAENTRY   (0x1ff<<5)
 
#define DAVINCI_DMA_MCBSP_TX   2
 
#define DAVINCI_DMA_MCBSP_RX   3
 
#define DAVINCI_DMA_VPSS_HIST   4
 
#define DAVINCI_DMA_VPSS_H3A   5
 
#define DAVINCI_DMA_VPSS_PRVU   6
 
#define DAVINCI_DMA_VPSS_RSZ   7
 
#define DAVINCI_DMA_IMCOP_IMXINT   8
 
#define DAVINCI_DMA_IMCOP_VLCDINT   9
 
#define DAVINCI_DMA_IMCO_PASQINT   10
 
#define DAVINCI_DMA_IMCOP_DSQINT   11
 
#define DAVINCI_DMA_SPI_SPIX   16
 
#define DAVINCI_DMA_SPI_SPIR   17
 
#define DAVINCI_DMA_UART0_URXEVT0   18
 
#define DAVINCI_DMA_UART0_UTXEVT0   19
 
#define DAVINCI_DMA_UART1_URXEVT1   20
 
#define DAVINCI_DMA_UART1_UTXEVT1   21
 
#define DAVINCI_DMA_UART2_URXEVT2   22
 
#define DAVINCI_DMA_UART2_UTXEVT2   23
 
#define DAVINCI_DMA_MEMSTK_MSEVT   24
 
#define DAVINCI_DMA_MMCRXEVT   26
 
#define DAVINCI_DMA_MMCTXEVT   27
 
#define DAVINCI_DMA_I2C_ICREVT   28
 
#define DAVINCI_DMA_I2C_ICXEVT   29
 
#define DAVINCI_DMA_GPIO_GPINT0   32
 
#define DAVINCI_DMA_GPIO_GPINT1   33
 
#define DAVINCI_DMA_GPIO_GPINT2   34
 
#define DAVINCI_DMA_GPIO_GPINT3   35
 
#define DAVINCI_DMA_GPIO_GPINT4   36
 
#define DAVINCI_DMA_GPIO_GPINT5   37
 
#define DAVINCI_DMA_GPIO_GPINT6   38
 
#define DAVINCI_DMA_GPIO_GPINT7   39
 
#define DAVINCI_DMA_GPIO_GPBNKINT0   40
 
#define DAVINCI_DMA_GPIO_GPBNKINT1   41
 
#define DAVINCI_DMA_GPIO_GPBNKINT2   42
 
#define DAVINCI_DMA_GPIO_GPBNKINT3   43
 
#define DAVINCI_DMA_GPIO_GPBNKINT4   44
 
#define DAVINCI_DMA_TIMER0_TINT0   48
 
#define DAVINCI_DMA_TIMER1_TINT1   49
 
#define DAVINCI_DMA_TIMER2_TINT2   50
 
#define DAVINCI_DMA_TIMER3_TINT3   51
 
#define DAVINCI_DMA_PWM0   52
 
#define DAVINCI_DMA_PWM1   53
 
#define DAVINCI_DMA_PWM2   54
 
#define EDMA_DA830_NUM_DMACH   32
 
#define EDMA_DA830_NUM_TCC   32
 
#define EDMA_DA830_NUM_PARAMENTRY   128
 
#define EDMA_DA830_NUM_EVQUE   2
 
#define EDMA_DA830_NUM_TC   2
 
#define EDMA_DA830_CHMAP_EXIST   0
 
#define EDMA_DA830_NUM_REGIONS   4
 
#define DA830_DMACH2EVENT_MAP0   0x000FC03Fu
 
#define DA830_DMACH2EVENT_MAP1   0x00000000u
 
#define DA830_EDMA_ARM_OWN   0x30FFCCFFu
 
#define DMA_COMPLETE   1
 
#define DMA_CC_ERROR   2
 
#define DMA_TC1_ERROR   3
 
#define DMA_TC2_ERROR   4
 
#define EDMA_CTLR_CHAN(ctlr, chan)   (((ctlr) << 16) | (chan))
 
#define EDMA_CTLR(i)   ((i) >> 16)
 
#define EDMA_CHAN_SLOT(i)   ((i) & 0xffff)
 
#define EDMA_CHANNEL_ANY   -1 /* for edma_alloc_channel() */
 
#define EDMA_SLOT_ANY   -1 /* for edma_alloc_slot() */
 
#define EDMA_CONT_PARAMS_ANY   1001
 
#define EDMA_CONT_PARAMS_FIXED_EXACT   1002
 
#define EDMA_CONT_PARAMS_FIXED_NOT_EXACT   1003
 
#define EDMA_MAX_CC   2
 

Enumerations

enum  address_mode { INCR = 0, FIFO = 1 }
 
enum  fifo_width {
  W8BIT = 0, W16BIT = 1, W32BIT = 2, W64BIT = 3,
  W128BIT = 4, W256BIT = 5
}
 
enum  dma_event_q {
  EVENTQ_0 = 0, EVENTQ_1 = 1, EVENTQ_2 = 2, EVENTQ_3 = 3,
  EVENTQ_DEFAULT = -1
}
 
enum  sync_dimension { ASYNC = 0, ABSYNC = 1 }
 

Functions

int edma_alloc_channel (int channel, void(*callback)(unsigned channel, u16 ch_status, void *data), void *data, enum dma_event_q)
 
void edma_free_channel (unsigned channel)
 
int edma_alloc_slot (unsigned ctlr, int slot)
 
void edma_free_slot (unsigned slot)
 
int edma_alloc_cont_slots (unsigned ctlr, unsigned int id, int slot, int count)
 
int edma_free_cont_slots (unsigned slot, int count)
 
void edma_set_src (unsigned slot, dma_addr_t src_port, enum address_mode mode, enum fifo_width)
 
void edma_set_dest (unsigned slot, dma_addr_t dest_port, enum address_mode mode, enum fifo_width)
 
void edma_get_position (unsigned slot, dma_addr_t *src, dma_addr_t *dst)
 
void edma_set_src_index (unsigned slot, s16 src_bidx, s16 src_cidx)
 
void edma_set_dest_index (unsigned slot, s16 dest_bidx, s16 dest_cidx)
 
void edma_set_transfer_params (unsigned slot, u16 acnt, u16 bcnt, u16 ccnt, u16 bcnt_rld, enum sync_dimension sync_mode)
 
void edma_link (unsigned from, unsigned to)
 
void edma_unlink (unsigned from)
 
void edma_write_slot (unsigned slot, const struct edmacc_param *params)
 
void edma_read_slot (unsigned slot, struct edmacc_param *params)
 
int edma_start (unsigned channel)
 
void edma_stop (unsigned channel)
 
void edma_clean_channel (unsigned channel)
 
void edma_clear_event (unsigned channel)
 
void edma_pause (unsigned channel)
 
void edma_resume (unsigned channel)
 

Macro Definition Documentation

#define CCERRINT_INTERRUPT   17

Definition at line 73 of file edma.h.

#define CCINT0_INTERRUPT   16

Definition at line 72 of file edma.h.

#define DA830_DMACH2EVENT_MAP0   0x000FC03Fu

Definition at line 150 of file edma.h.

#define DA830_DMACH2EVENT_MAP1   0x00000000u

Definition at line 151 of file edma.h.

#define DA830_EDMA_ARM_OWN   0x30FFCCFFu

Definition at line 152 of file edma.h.

#define DAM   BIT(1)

Definition at line 79 of file edma.h.

#define DAVINCI_DMA_GPIO_GPBNKINT0   40

Definition at line 129 of file edma.h.

#define DAVINCI_DMA_GPIO_GPBNKINT1   41

Definition at line 130 of file edma.h.

#define DAVINCI_DMA_GPIO_GPBNKINT2   42

Definition at line 131 of file edma.h.

#define DAVINCI_DMA_GPIO_GPBNKINT3   43

Definition at line 132 of file edma.h.

#define DAVINCI_DMA_GPIO_GPBNKINT4   44

Definition at line 133 of file edma.h.

#define DAVINCI_DMA_GPIO_GPINT0   32

Definition at line 121 of file edma.h.

#define DAVINCI_DMA_GPIO_GPINT1   33

Definition at line 122 of file edma.h.

#define DAVINCI_DMA_GPIO_GPINT2   34

Definition at line 123 of file edma.h.

#define DAVINCI_DMA_GPIO_GPINT3   35

Definition at line 124 of file edma.h.

#define DAVINCI_DMA_GPIO_GPINT4   36

Definition at line 125 of file edma.h.

#define DAVINCI_DMA_GPIO_GPINT5   37

Definition at line 126 of file edma.h.

#define DAVINCI_DMA_GPIO_GPINT6   38

Definition at line 127 of file edma.h.

#define DAVINCI_DMA_GPIO_GPINT7   39

Definition at line 128 of file edma.h.

#define DAVINCI_DMA_I2C_ICREVT   28

Definition at line 119 of file edma.h.

#define DAVINCI_DMA_I2C_ICXEVT   29

Definition at line 120 of file edma.h.

#define DAVINCI_DMA_IMCO_PASQINT   10

Definition at line 106 of file edma.h.

#define DAVINCI_DMA_IMCOP_DSQINT   11

Definition at line 107 of file edma.h.

#define DAVINCI_DMA_IMCOP_IMXINT   8

Definition at line 104 of file edma.h.

#define DAVINCI_DMA_IMCOP_VLCDINT   9

Definition at line 105 of file edma.h.

#define DAVINCI_DMA_MCBSP_RX   3

Definition at line 99 of file edma.h.

#define DAVINCI_DMA_MCBSP_TX   2

Definition at line 98 of file edma.h.

#define DAVINCI_DMA_MEMSTK_MSEVT   24

Definition at line 116 of file edma.h.

#define DAVINCI_DMA_MMCRXEVT   26

Definition at line 117 of file edma.h.

#define DAVINCI_DMA_MMCTXEVT   27

Definition at line 118 of file edma.h.

#define DAVINCI_DMA_PWM0   52

Definition at line 138 of file edma.h.

#define DAVINCI_DMA_PWM1   53

Definition at line 139 of file edma.h.

#define DAVINCI_DMA_PWM2   54

Definition at line 140 of file edma.h.

#define DAVINCI_DMA_SPI_SPIR   17

Definition at line 109 of file edma.h.

#define DAVINCI_DMA_SPI_SPIX   16

Definition at line 108 of file edma.h.

#define DAVINCI_DMA_TIMER0_TINT0   48

Definition at line 134 of file edma.h.

#define DAVINCI_DMA_TIMER1_TINT1   49

Definition at line 135 of file edma.h.

#define DAVINCI_DMA_TIMER2_TINT2   50

Definition at line 136 of file edma.h.

#define DAVINCI_DMA_TIMER3_TINT3   51

Definition at line 137 of file edma.h.

#define DAVINCI_DMA_UART0_URXEVT0   18

Definition at line 110 of file edma.h.

#define DAVINCI_DMA_UART0_UTXEVT0   19

Definition at line 111 of file edma.h.

#define DAVINCI_DMA_UART1_URXEVT1   20

Definition at line 112 of file edma.h.

#define DAVINCI_DMA_UART1_UTXEVT1   21

Definition at line 113 of file edma.h.

#define DAVINCI_DMA_UART2_URXEVT2   22

Definition at line 114 of file edma.h.

#define DAVINCI_DMA_UART2_UTXEVT2   23

Definition at line 115 of file edma.h.

#define DAVINCI_DMA_VPSS_H3A   5

Definition at line 101 of file edma.h.

#define DAVINCI_DMA_VPSS_HIST   4

Definition at line 100 of file edma.h.

#define DAVINCI_DMA_VPSS_PRVU   6

Definition at line 102 of file edma.h.

#define DAVINCI_DMA_VPSS_RSZ   7

Definition at line 103 of file edma.h.

#define DMA_CC_ERROR   2

Definition at line 156 of file edma.h.

#define DMA_COMPLETE   1

Definition at line 155 of file edma.h.

#define DMA_TC1_ERROR   3

Definition at line 157 of file edma.h.

#define DMA_TC2_ERROR   4

Definition at line 158 of file edma.h.

#define EDMA_CHAN_SLOT (   i)    ((i) & 0xffff)

Definition at line 189 of file edma.h.

#define EDMA_CHANNEL_ANY   -1 /* for edma_alloc_channel() */

Definition at line 191 of file edma.h.

#define EDMA_CONT_PARAMS_ANY   1001

Definition at line 193 of file edma.h.

#define EDMA_CONT_PARAMS_FIXED_EXACT   1002

Definition at line 194 of file edma.h.

#define EDMA_CONT_PARAMS_FIXED_NOT_EXACT   1003

Definition at line 195 of file edma.h.

#define EDMA_CTLR (   i)    ((i) >> 16)

Definition at line 188 of file edma.h.

#define EDMA_CTLR_CHAN (   ctlr,
  chan 
)    (((ctlr) << 16) | (chan))

Definition at line 187 of file edma.h.

#define EDMA_DA830_CHMAP_EXIST   0

Definition at line 148 of file edma.h.

#define EDMA_DA830_NUM_DMACH   32

Definition at line 143 of file edma.h.

#define EDMA_DA830_NUM_EVQUE   2

Definition at line 146 of file edma.h.

#define EDMA_DA830_NUM_PARAMENTRY   128

Definition at line 145 of file edma.h.

#define EDMA_DA830_NUM_REGIONS   4

Definition at line 149 of file edma.h.

#define EDMA_DA830_NUM_TC   2

Definition at line 147 of file edma.h.

#define EDMA_DA830_NUM_TCC   32

Definition at line 144 of file edma.h.

#define EDMA_FWID   (0x07 << 8)

Definition at line 82 of file edma.h.

#define EDMA_MAX_CC   2

Definition at line 197 of file edma.h.

#define EDMA_SLOT_ANY   -1 /* for edma_alloc_slot() */

Definition at line 192 of file edma.h.

#define EDMA_TCC (   t)    ((t) << 12)

Definition at line 84 of file edma.h.

#define ITCCHEN   BIT(23)

Definition at line 88 of file edma.h.

#define ITCINTEN   BIT(21)

Definition at line 86 of file edma.h.

#define PAENTRY   (0x1ff<<5)

Definition at line 91 of file edma.h.

#define SAM   BIT(0)

Definition at line 78 of file edma.h.

#define STATIC   BIT(3)

Definition at line 81 of file edma.h.

#define SYNCDIM   BIT(2)

Definition at line 80 of file edma.h.

#define TCCHEN   BIT(22)

Definition at line 87 of file edma.h.

#define TCCMODE   BIT(11)

Definition at line 83 of file edma.h.

#define TCERRINT0_INTERRUPT   18

Definition at line 74 of file edma.h.

#define TCERRINT1_INTERRUPT   19

Definition at line 75 of file edma.h.

#define TCINTEN   BIT(20)

Definition at line 85 of file edma.h.

#define TRWORD   (0x7<<2)

Definition at line 90 of file edma.h.

Enumeration Type Documentation

Enumerator:
INCR 
FIFO 

Definition at line 160 of file edma.h.

Enumerator:
EVENTQ_0 
EVENTQ_1 
EVENTQ_2 
EVENTQ_3 
EVENTQ_DEFAULT 

Definition at line 174 of file edma.h.

enum fifo_width
Enumerator:
W8BIT 
W16BIT 
W32BIT 
W64BIT 
W128BIT 
W256BIT 

Definition at line 165 of file edma.h.

Enumerator:
ASYNC 
ABSYNC 

Definition at line 182 of file edma.h.

Function Documentation

int edma_alloc_channel ( int  channel,
void(*)(unsigned channel, u16 ch_status, void *data callback,
void data,
enum dma_event_q  eventq_no 
)

edma_alloc_channel - allocate DMA channel and paired parameter RAM : specific channel to allocate; negative for "any unmapped channel" : optional; to be issued on DMA completion or errors : passed to callback : an EVENTQ_* constant, used to choose which Transfer Controller (TC) executes requests using this channel. Use EVENTQ_DEFAULT unless you really need a high priority queue.

This allocates a DMA channel and its associated parameter RAM slot. The parameter RAM is initialized to hold a dummy transfer.

Normal use is to pass a specific channel number as , to make use of hardware events mapped to that channel. When the channel will be used only for software triggering or event chaining, channels not mapped to hardware events (or mapped to unused events) are preferable.

DMA transfers start from a channel using edma_start(), or by chaining. When the transfer described in that channel's parameter RAM slot completes, that slot's data may be reloaded through a link.

DMA errors are only reported to the associated with the channel driving that transfer, but transfer completion callbacks can be sent to another channel under control of the TCC field in the option word of the transfer's parameter RAM set. Drivers must not use DMA transfer completion callbacks for channels they did not allocate. (The same applies to TCC codes used in transfer chaining.)

Returns the number of the channel, else negative errno.

Definition at line 626 of file dma.c.

int edma_alloc_cont_slots ( unsigned  ctlr,
unsigned int  id,
int  slot,
int  count 
)

edma_alloc_cont_slots- alloc contiguous parameter RAM slots The API will return the starting point of a set of contiguous parameter RAM slots that have been requested

: can only be EDMA_CONT_PARAMS_ANY or EDMA_CONT_PARAMS_FIXED_EXACT or EDMA_CONT_PARAMS_FIXED_NOT_EXACT : number of contiguous Paramter RAM slots - the start value of Parameter RAM slot that should be passed if id is EDMA_CONT_PARAMS_FIXED_EXACT or EDMA_CONT_PARAMS_FIXED_NOT_EXACT

If id is EDMA_CONT_PARAMS_ANY then the API starts looking for a set of contiguous Parameter RAM slots from parameter RAM 64 in the case of DaVinci SOCs and 32 in the case of DA8xx SOCs.

If id is EDMA_CONT_PARAMS_FIXED_EXACT then the API starts looking for a set of contiguous parameter RAM slots from the "slot" that is passed as an argument to the API.

If id is EDMA_CONT_PARAMS_FIXED_NOT_EXACT then the API initially tries starts looking for a set of contiguous parameter RAMs from the "slot" that is passed as an argument to the API. On failure the API will try to find a set of contiguous Parameter RAM slots from the remaining Parameter RAM slots

Definition at line 824 of file dma.c.

int edma_alloc_slot ( unsigned  ctlr,
int  slot 
)

edma_alloc_slot - allocate DMA parameter RAM : specific slot to allocate; negative for "any unused slot"

This allocates a parameter RAM slot, initializing it to hold a dummy transfer. Slots allocated using this routine have not been mapped to a hardware DMA channel, and will normally be used by linking to them from a slot associated with a DMA channel.

Normal use is to pass EDMA_SLOT_ANY as the , but specific slots may be allocated on behalf of DSP firmware.

Returns the number of the slot, else negative errno.

Definition at line 744 of file dma.c.

void edma_clean_channel ( unsigned  channel)

Definition at line 1344 of file dma.c.

void edma_clear_event ( unsigned  channel)

Definition at line 1372 of file dma.c.

void edma_free_channel ( unsigned  channel)

edma_free_channel - deallocate DMA channel : dma channel returned from edma_alloc_channel()

This deallocates the DMA channel and associated parameter RAM slot allocated by edma_alloc_channel().

Callers are responsible for ensuring the channel is inactive, and will not be reactivated by linking, chaining, or software calls to edma_start().

Definition at line 711 of file dma.c.

int edma_free_cont_slots ( unsigned  slot,
int  count 
)

edma_free_cont_slots - deallocate DMA parameter RAM slots : first parameter RAM of a set of parameter RAM slots to be freed : the number of contiguous parameter RAM slots to be freed

This deallocates the parameter RAM slots allocated by edma_alloc_cont_slots. Callers/applications need to keep track of sets of contiguous parameter RAM slots that have been allocated using the edma_alloc_cont_slots API. Callers are responsible for ensuring the slots are inactive, and will not be activated.

Definition at line 872 of file dma.c.

void edma_free_slot ( unsigned  slot)

edma_free_slot - deallocate DMA parameter RAM : parameter RAM slot returned from edma_alloc_slot()

This deallocates the parameter RAM slot allocated by edma_alloc_slot(). Callers are responsible for ensuring the slot is inactive, and will not be activated.

Definition at line 781 of file dma.c.

void edma_get_position ( unsigned  slot,
dma_addr_t src,
dma_addr_t dst 
)

edma_get_position - returns the current transfer points : parameter RAM slot being examined : pointer to source port position : pointer to destination port position

Returns current source and destination addresses for a particular parameter RAM slot. Its channel should not be active when this is called.

Definition at line 986 of file dma.c.

void edma_link ( unsigned  from,
unsigned  to 
)

edma_link - link one parameter RAM slot to another : parameter RAM slot originating the link : parameter RAM slot which is the link target

The originating slot should not be part of any active DMA transfer.

Definition at line 1113 of file dma.c.

void edma_pause ( unsigned  channel)

edma_pause - pause dma on a channel : on which edma_start() has been called

This temporarily disables EDMA hardware events on the specified channel, preventing them from triggering new transfers on its behalf

Definition at line 1212 of file dma.c.

void edma_read_slot ( unsigned  slot,
struct edmacc_param param 
)

edma_read_slot - read parameter RAM data from slot : number of parameter RAM slot being copied

Parameters
where to store copy of parameter RAM data

Use this to read data from a parameter RAM slot, perhaps to save them as a template for later reuse.

Definition at line 1187 of file dma.c.

void edma_resume ( unsigned  channel)

edma_resume - resumes dma on a paused channel : on which edma_pause() has been called

This re-enables EDMA hardware events on the specified channel.

Definition at line 1233 of file dma.c.

void edma_set_dest ( unsigned  slot,
dma_addr_t  dest_port,
enum address_mode  mode,
enum fifo_width  width 
)

edma_set_dest - set initial DMA destination address in parameter RAM slot : parameter RAM slot being configured : physical address of destination (memory, controller FIFO, etc) : INCR, except in very rare cases : ignored unless is FIFO, else specifies the width to use when addressing the fifo (e.g. W8BIT, W32BIT)

Note that the destination address is modified during the DMA transfer according to edma_set_dest_index().

Definition at line 951 of file dma.c.

void edma_set_dest_index ( unsigned  slot,
s16  dest_bidx,
s16  dest_cidx 
)

edma_set_dest_index - configure DMA destination address indexing : parameter RAM slot being configured : byte offset between destination arrays in a frame : byte offset between destination frames in a block

Offsets are specified to support either contiguous or discontiguous memory transfers, or repeated access to a hardware register, as needed. When accessing hardware registers, both offsets are normally zero.

Definition at line 1038 of file dma.c.

void edma_set_src ( unsigned  slot,
dma_addr_t  src_port,
enum address_mode  mode,
enum fifo_width  width 
)

edma_set_src - set initial DMA source address in parameter RAM slot : parameter RAM slot being configured : physical address of source (memory, controller FIFO, etc) : INCR, except in very rare cases : ignored unless is FIFO, else specifies the width to use when addressing the fifo (e.g. W8BIT, W32BIT)

Note that the source address is modified during the DMA transfer according to edma_set_src_index().

Definition at line 913 of file dma.c.

void edma_set_src_index ( unsigned  slot,
s16  src_bidx,
s16  src_cidx 
)

edma_set_src_index - configure DMA source address indexing : parameter RAM slot being configured : byte offset between source arrays in a frame : byte offset between source frames in a block

Offsets are specified to support either contiguous or discontiguous memory transfers, or repeated access to a hardware register, as needed. When accessing hardware registers, both offsets are normally zero.

Definition at line 1012 of file dma.c.

void edma_set_transfer_params ( unsigned  slot,
u16  acnt,
u16  bcnt,
u16  ccnt,
u16  bcnt_rld,
enum sync_dimension  sync_mode 
)

edma_set_transfer_params - configure DMA transfer parameters : parameter RAM slot being configured : how many bytes per array (at least one) : how many arrays per frame (at least one) : how many frames per block (at least one) : used only for A-Synchronized transfers; this specifies the value to reload into bcnt when it decrements to zero : ASYNC or ABSYNC

See the EDMA3 documentation to understand how to configure and link transfers using the fields in PaRAM slots. If you are not doing it all at once with edma_write_slot(), you will use this routine plus two calls each for source and destination, setting the initial address and saying how to index that address.

An example of an A-Synchronized transfer is a serial link using a single word shift register. In that case, would be equal to that word size; the serial controller issues a DMA synchronization event to transfer each word, and memory access by the DMA transfer controller will be word-at-a-time.

An example of an AB-Synchronized transfer is a device using a FIFO. In that case, equals the FIFO width and equals its depth. The controller with the FIFO issues DMA synchronization events when the FIFO threshold is reached, and the DMA transfer controller will transfer one frame to (or from) the FIFO. It will probably use efficient burst modes to access memory.

Definition at line 1083 of file dma.c.

int edma_start ( unsigned  channel)

edma_start - start dma on a channel : channel being activated

Channels with event associations will be triggered by their hardware events, and channels without such associations will be triggered by software. (At this writing there is no interface for using software triggers except with channels that don't support hardware triggers.)

Returns zero on success, else negative errno.

Definition at line 1259 of file dma.c.

void edma_stop ( unsigned  channel)

edma_stop - stops dma on the channel passed : channel being deactivated

When is a channel, any active transfer is paused and all pending hardware events are cleared. The current transfer may not be resumed, and the channel's Parameter RAM should be reinitialized before being reused.

Definition at line 1305 of file dma.c.

void edma_unlink ( unsigned  from)

edma_unlink - cut link from one parameter RAM slot : parameter RAM slot originating the link

The originating slot should not be part of any active DMA transfer. Its link is set to 0xffff.

Definition at line 1138 of file dma.c.

void edma_write_slot ( unsigned  slot,
const struct edmacc_param param 
)

edma_write_slot - write parameter RAM data for slot : number of parameter RAM slot being modified

Parameters
data to be written into parameter RAM slot

Use this to assign all parameters of a transfer at once. This allows more efficient setup of transfers than issuing multiple calls to set up those parameters in small pieces, and provides complete control over all transfer options.

Definition at line 1165 of file dma.c.