.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "SA1100_START_DMA" "" "06 October 2005" "" "" .SH NAME sa1100_start_dma \- submit a data buffer for DMA .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp int sa1100_start_dma (dma_regs_t * \fIregs\fB, dma_addr_t \fIdma_ptr\fB, u_int \fIsize\fB); \fR .SH "ARGUMENTS" .TP \fB\fIregs\fB\fR identifier for the channel to use .TP \fB\fIdma_ptr\fB\fR buffer physical (or bus) start address .TP \fB\fIsize\fB\fR buffer size .SH "DESCRIPTION" .PP 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. .PP The \fIregs\fR identifier is provided by a successful call to \fBsa1100_request_dma\fR\&. .PP The \fIsize\fR 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 \fIsize\fR 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. .SH "ERROR RETURN VALUES" .PP -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. .PP This function returs 0 on success.