Data Structures | |
struct | EDMA_requestDmaParams |
EDMAK ioctl input/output parameters. More... | |
struct | EDMA_releaseDmaParams |
EDMAK ioctl input parameters. More... | |
Defines | |
#define | EDMA_VERSION 0x01100000U |
#define | EDMA_TCCANY 1001 |
Values for dev_id parameter of EDMA_getResource(). | |
#define | EDMA_TCCSYMM 1005 |
#define | EDMA_PARAMANY 1006 |
#define | EDMA_PARAMFIXEDEXACT 1007 |
#define | EDMA_PARAMFIXEDNOTEXACT 1008 |
#define | EDMA_EDMAANY 1003 |
#define | EDMA_QDMAANY 1004 |
#define | EDMA_QDMA0 512 |
#define | EDMA_QDMA1 EDMA_QDMA(1) |
#define | EDMA_QDMA2 EDMA_QDMA(2) |
#define | EDMA_QDMA3 EDMA_QDMA(3) |
#define | EDMA_QDMA4 EDMA_QDMA(4) |
#define | EDMA_QDMA5 EDMA_QDMA(5) |
#define | EDMA_QDMA6 EDMA_QDMA(6) |
#define | EDMA_QDMA7 EDMA_QDMA(7) |
#define | EDMA_QDMA(n) (EDMA_QDMA0 + (n)) |
macro used to translate from a QDMA channel # to the numerical range used by EDMA_getResource() & EDMA_freeResource() for representing a QDMA channel. | |
#define | EDMA_QDMA2NUM(qdma) (qdma - EDMA_QDMA0) |
macro to translate from EDMA_QDMA0 -> EDMA_QDMA7 namespace to actual QDMA number 0 -> 7. | |
Enumerations | |
enum | EDMA_commmands { EDMA_IOCREQUESTDMA = 1, EDMA_IOCRELEASEDMA, EDMA_IOCGETVERSION, EDMA_IOCGETBASEPHYSADDR, EDMA_IOCREGUSER } |
EDMAK ioctl() commands. More... | |
enum | EDMA_Status { EDMA_OK = 0, EDMA_EFAIL, EDMA_ENOCHANNEL, EDMA_ENOINIT } |
Status codes for EDMA API return values. More... | |
Functions | |
int | EDMA_init (void) |
EDMA initialization API. | |
int | EDMA_exit (void) |
EDMA finalization API. | |
EDMA_Status | EDMA_mapBaseAddress (void **pvirtAddr) |
Returns user space virtual address of EDMA base registers. | |
EDMA_Status | EDMA_getResource (int devId, int *tcc, int *channel, int *param, int nParams) |
Returns available logical channels. | |
EDMA_Status | EDMA_freeResource (int lch, int nParams) |
Frees previously requested logical channel. | |
int | EDMA_getVersion (void) |
Retrieve version from EDMA driver. | |
EDMA_Status | EDMA_registerResource (int lch) |
Registers calling process as a user of lch. | |
EDMA_Status | EDMA_unregister (int lch, int nParams) |
Unregisters calling process as a user of lch. |
#define EDMA_VERSION 0x01100000U |
#define EDMA_TCCANY 1001 |
Values for dev_id parameter of EDMA_getResource().
#define EDMA_TCCSYMM 1005 |
#define EDMA_PARAMANY 1006 |
#define EDMA_PARAMFIXEDEXACT 1007 |
#define EDMA_PARAMFIXEDNOTEXACT 1008 |
#define EDMA_EDMAANY 1003 |
#define EDMA_QDMAANY 1004 |
#define EDMA_QDMA0 512 |
#define EDMA_QDMA1 EDMA_QDMA(1) |
#define EDMA_QDMA2 EDMA_QDMA(2) |
#define EDMA_QDMA3 EDMA_QDMA(3) |
#define EDMA_QDMA4 EDMA_QDMA(4) |
#define EDMA_QDMA5 EDMA_QDMA(5) |
#define EDMA_QDMA6 EDMA_QDMA(6) |
#define EDMA_QDMA7 EDMA_QDMA(7) |
#define EDMA_QDMA | ( | n | ) | (EDMA_QDMA0 + (n)) |
macro used to translate from a QDMA channel # to the numerical range used by EDMA_getResource() & EDMA_freeResource() for representing a QDMA channel.
#define EDMA_QDMA2NUM | ( | qdma | ) | (qdma - EDMA_QDMA0) |
macro to translate from EDMA_QDMA0 -> EDMA_QDMA7 namespace to actual QDMA number 0 -> 7.
EMDA_QDMA()
enum EDMA_commmands |
enum EDMA_Status |
Status codes for EDMA API return values.
EDMA_OK | OK |
EDMA_EFAIL | general failure |
EDMA_ENOCHANNEL | no channels available |
EDMA_ENOINIT | EDMA_init() not called |
int EDMA_init | ( | void | ) |
EDMA initialization API.
int EDMA_exit | ( | void | ) |
EDMA finalization API.
EDMA_Status EDMA_mapBaseAddress | ( | void ** | pvirtAddr | ) |
Returns user space virtual address of EDMA base registers.
pvirtAddr | pointer to storage for virtual address. |
EDMA_Status EDMA_getResource | ( | int | devId, | |
int * | tcc, | |||
int * | channel, | |||
int * | param, | |||
int | nParams | |||
) |
Returns available logical channels.
devId | EDMA channel # or EDMA_QDMA(0 -> # QDMAs) or EDMA_EDMAANY or EDMA_QDMAANY or EDMA_PARAMANY. | |
tcc | pointer to TCC #. Serves as input or output or both, depending on the type of resource requested (devId). | |
channel | pointer to channel #. Serves as output parameter only (explicit channel # request has channel # in devId parameter). | |
param | pointer to PaRAM #. Serves as input or output or both, depending on the type of resource requested (devId). | |
nParams | number of consecutive PaRAMs to allocate, applies only when devId is EDMA_PARAMANY. |
The following information shows which function parameters are valid for all types of allocations: devId input parameters output parameters ----- ---------------- ----------------- EDMA # none channel, tcc, param*# EDMA_EDMAANY tcc channel, tcc, param* EDMA_QDMA# tcc channel, tcc, param EDMA_QDMAANY tcc channel, tcc, param EDMA_PARAMANY nParams channel, tcc, param* * channel and param are the same value # channel and tcc are the same value
EDMA_Status EDMA_freeResource | ( | int | lch, | |
int | nParams | |||
) |
Frees previously requested logical channel.
lch | channel number. EDMA channels range from 0 -> (# channels). PaRAM channels range from (# channels) -> (# PaRAMs). QDMA channels range from EDMA_QDMA(0 -> # QDMAs). | |
nParams | number of consecutive PaRAMs to free, starting at lch, applies only when lch is a PaRAM identifier. |
int EDMA_getVersion | ( | void | ) |
Retrieve version from EDMA driver.
EDMA_Status EDMA_registerResource | ( | int | lch | ) |
Registers calling process as a user of lch.
lch | Resource (channel) # returned by EDMA_getResource(). |
Each call by the same process adds the process to the registration list a separate time, so that each call must be matched by a corresponding EDMA_unregister() call.
EDMA_Status EDMA_unregister | ( | int | lch, | |
int | nParams | |||
) |
Unregisters calling process as a user of lch.
lch | Resource (channel) # returned by EDMA_getResource(). | |
nParams | number of PaRAMs, if lch represents a set of PaRAMS. |
A process must match each EDMA_registerResource() call with a call to EDMA_unregister().