EDMA Manager
Data Structures |
struct | EDMA_requestDmaParams |
| EDMAK ioctl input/output parameters. More...
|
struct | EDMA_releaseDmaParams |
| EDMAK ioctl input parameters. More...
|
Defines |
#define | EDMA_VERSION 0x02000000U |
#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.
|
#define | EDMA_IOCMAGIC 0x0000fd00 |
#define | EDMA_IOCCMDMASK 0x000000ff |
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.
|
Detailed Description
This is the API for the EDMA manager.
Define Documentation
#define EDMA_VERSION 0x02000000U |
#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_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)) |
#define EDMA_QDMA2NUM |
( |
qdma |
|
) |
(qdma - EDMA_QDMA0) |
#define EDMA_IOCMAGIC 0x0000fd00 |
#define EDMA_IOCCMDMASK 0x000000ff |
Enumeration Type Documentation
EDMAK ioctl() commands.
- Enumerator:
EDMA_IOCREQUESTDMA |
|
EDMA_IOCRELEASEDMA |
|
EDMA_IOCGETVERSION |
|
EDMA_IOCGETBASEPHYSADDR |
|
EDMA_IOCREGUSER |
|
Status codes for EDMA API return values.
- Enumerator:
EDMA_OK |
OK
|
EDMA_EFAIL |
general failure
|
EDMA_ENOCHANNEL |
no channels available
|
EDMA_ENOINIT |
EDMA_init() not called
|
Function Documentation
Returns user space virtual address of EDMA base registers.
- Parameters:
-
| 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.
- Parameters:
-
| 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. |
- See also:
- EDMA_freeResource()
-
EDMA_registerResource()
-
EDMA_unregister()
-
EDMA_QDMA()
-
EDMA_QDMA2NUM()
Frees previously requested logical channel.
- Parameters:
-
| 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. |
- See also:
- EDMA_getResource()
-
EDMA_registerResource()
-
EDMA_unregister()
-
EDMA_QDMA()
-
EDMA_QDMA2NUM()
int EDMA_getVersion |
( |
void |
|
) |
|
Retrieve version from EDMA driver.
- Returns:
- Installed EDMA driver's version number.
- Precondition:
- Must have called EDMA_init()