SA1100_REQUEST_DMA

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

 

NAME

sa1100_request_dma - allocate one of the SA11x0's DMA chanels  

SYNOPSIS

"SYNOPSIS"

int sa1100_request_dma (dma_device_t device, const char * device_id, dma_callback_t callback, void * data, dma_regs_t ** dma_regs);  

ARGUMENTS

device
The SA11x0 peripheral targeted by this request
device_id
An ascii name for the claiming device
callback
Function to be called when the DMA completes
data
A cookie passed back to the callback function
dma_regs
Pointer to the location of the allocated channel's identifier
 

DESCRIPTION

This function will search for a free DMA channel and returns the address of the hardware registers for that channel as the channel identifier. This identifier is written to the location pointed by dma_regs. The list of possible values for device are listed into linux/include/asm-arm/arch-sa1100/dma.h as a dma_device_t enum.

Note that reading from a port and writing to the same port are actually considered as two different streams requiring separate DMA registrations.

The callback function is called from interrupt context when one of the two possible DMA buffers in flight has terminated. That function has to be small and efficient while posponing more complex processing to a lower priority execution context.

If no channels are available, or if the desired device is already in use by another DMA channel, then an error code is returned. This function must be called before any other DMA calls.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION

This document was created by man2html, using the manual pages.
Time: 00:02:44 GMT, October 09, 2005