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 |
Typedefs | |
typedef enum EDMA_Status | EDMA_Status |
Status codes for EDMA API return values. | |
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. |
This is the API for the EDMA manager.
#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 |
typedef enum EDMA_Status EDMA_Status |
Status codes for EDMA API return values.
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. |
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(). |
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. |