SA1100_START_DMA

Section: ()
Updated: 06 October 2005
Index Return to Main Contents

 

NAME

sa1100_start_dma - submit a data buffer for DMA  

SYNOPSIS

"SYNOPSIS"

int sa1100_start_dma (dma_regs_t * regs, dma_addr_t dma_ptr, u_int size);  

ARGUMENTS

regs
identifier for the channel to use
dma_ptr
buffer physical (or bus) start address
size
buffer size
 

DESCRIPTION

This function hands the given data buffer to the hardware for DMA access. If another buffer is already in flight then this buffer will be queued so the DMA engine will switch to it automatically when the previous one is done. The DMA engine is actually toggling between two buffers so at most 2 successful calls can be made before one of them terminates and the callback function is called.

The regs identifier is provided by a successful call to sa1100_request_dma.

The size must not be larger than MAX_DMA_SIZE. If a given buffer is larger than that then it's the caller's responsibility to split it into smaller chunks and submit them separately. If this is the case then a size of CUT_DMA_SIZE is recommended to avoid ending up with too small chunks. The callback function can be used to chain submissions of buffer chunks.  

ERROR RETURN VALUES

-EOVERFLOW: Given buffer size is too big. -EBUSY: Both DMA buffers are already in use. -EAGAIN: Both buffers were busy but one of them just completed but the interrupt handler has to execute first.

This function returs 0 on success.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
ERROR RETURN VALUES

This document was created by man2html, using the manual pages.
Time: 07:07:24 GMT, October 06, 2005