PDK API Guide for J721E
|
This is UDMA driver proxy related configuration parameters and API
Files | |
file | udma_proxy.h |
UDMA proxy related parameters and API. | |
Data Structures | |
struct | Udma_ProxyCfg |
This structure contains configuration parameters for each proxy thread. More... | |
struct | Udma_ProxyHandle |
UDMA proxy object. More... | |
Functions | |
int32_t | Udma_proxyAlloc (Udma_DrvHandle drvHandle, Udma_ProxyHandle proxyHandle, uint16_t proxyNum) |
UDMA proxy allocation API. More... | |
int32_t | Udma_proxyFree (Udma_ProxyHandle proxyHandle) |
UDMA free proxy. More... | |
int32_t | Udma_proxyConfig (Udma_ProxyHandle proxyHandle, const Udma_ProxyCfg *proxyCfg) |
UDMA proxy config API. More... | |
static void | Udma_proxyQueue (Udma_ProxyHandle proxyHandle, uint64_t phyDescMem) |
UDMA queue descriptor to a proxy which is pre-configured to queue to a ring. More... | |
static void | Udma_proxyDequeue (Udma_ProxyHandle proxyHandle, uint64_t *phyDescMem) |
UDMA dequeue descriptor from a proxy which is pre-configured to dequeue from a ring. More... | |
static void | Udma_proxyWrite64 (uintptr_t proxyAddr, uint64_t data) |
API to write 64-bit data to proxy. More... | |
static void | Udma_proxyRead64 (uintptr_t proxyAddr, uint64_t *data) |
API to read 64-bit data from proxy. More... | |
Macros | |
#define | UDMA_PROXY_INVALID ((uint16_t) 0xFFFFU) |
Macro used to specify that proxy ID is invalid. More... | |
#define | UDMA_PROXY_ANY ((uint16_t) 0xFFFEU) |
Macro used to specify any available free proxy while requesting one. Used in the API Udma_proxyAlloc. More... | |
#define UDMA_PROXY_INVALID ((uint16_t) 0xFFFFU) |
Macro used to specify that proxy ID is invalid.
#define UDMA_PROXY_ANY ((uint16_t) 0xFFFEU) |
Macro used to specify any available free proxy while requesting one. Used in the API Udma_proxyAlloc.
int32_t Udma_proxyAlloc | ( | Udma_DrvHandle | drvHandle, |
Udma_ProxyHandle | proxyHandle, | ||
uint16_t | proxyNum | ||
) |
UDMA proxy allocation API.
Note: In case of devices like AM64x where there is no proxy, this API is not supported and will return error.
Requirement: DOX_REQ_TAG(PDK-4156)
drvHandle | [IN] UDMA driver handle pointer passed during Udma_init |
proxyHandle | [IN/OUT] UDMA proxy handle. The caller need to allocate memory for this object and pass this pointer to all further APIs. The caller should not change any parameters as this is owned and maintained by the driver. |
proxyNum | [IN] Proxy number. If set to UDMA_PROXY_ANY, will allocate from free proxy pool. Else will try to allocate the mentioned proxy itself. |
int32_t Udma_proxyFree | ( | Udma_ProxyHandle | proxyHandle | ) |
UDMA free proxy.
Freeup the proxy resources.
Note: In case of devices like AM64x where there is no proxy, this API is not supported and will return error.
Requirement: DOX_REQ_TAG(PDK-4156)
proxyHandle | [IN] UDMA proxy handle. This parameter can't be NULL. |
int32_t Udma_proxyConfig | ( | Udma_ProxyHandle | proxyHandle, |
const Udma_ProxyCfg * | proxyCfg | ||
) |
UDMA proxy config API.
This API should be called before performing any proxy operation. This same API can be used to reconfigure the proxy if the ring number changes or the ring (queue/dequeue) operation changes. If there is no change, the proxy queue/dequeue API can be called without the need to reconfigure the proxy (Thus saving CPU cycles)
Note: In case of devices like AM64x where there is no proxy, this API is not supported and will return error.
Requirement: DOX_REQ_TAG(PDK-4156)
proxyHandle | [IN] UDMA proxy handle. This parameter can't be NULL. |
proxyCfg | [IN] UDMA proxy configuration. This parameter can't be NULL. For queue operation the mode parameter should be set to CSL_PROXY_QUEUE_ACCESS_MODE_TAIL For dequeue operation the mode parameter should be set to CSL_PROXY_QUEUE_ACCESS_MODE_HEAD |
|
inlinestatic |
UDMA queue descriptor to a proxy which is pre-configured to queue to a ring.
Caution: This API doesn't do any error check for performance reasons The user should ensure that the proxy is configured to perform a dequeue or queue operation to a ring. Caution: User should also ensure that the corresponding ring is not full. Performing a proxy queue operation to an already full ring will result in ring error (overflow).
Requirement: DOX_REQ_TAG(PDK-4156)
proxyHandle | [IN] UDMA proxy handle. This parameter can't be NULL. |
phyDescMem | [IN] Descriptor memory physical pointer to push to the ring. |
|
inlinestatic |
UDMA dequeue descriptor from a proxy which is pre-configured to dequeue from a ring.
Caution: This API doesn't do any error check for performance reasons The user should ensure that the proxy is configured to perform a dequeue or queue operation to a ring. Caution: User should also ensure that the corresponding ring is not empty. Performing a proxy dequeue operation to an empty ring will result in ring error (underflow).
Requirement: DOX_REQ_TAG(PDK-4156)
proxyHandle | [IN] UDMA proxy handle. This parameter can't be NULL. |
phyDescMem | [OUT] Descriptor memory physical pointer read from the ring. This will be NULL if there is nothing to pop from the ring. |
|
inlinestatic |
API to write 64-bit data to proxy.
Requirement: DOX_REQ_TAG(PDK-4156)
proxyAddr | [IN] Proxy data address (pre-calculated for a 64-bit write). |
data | [IN] 64-bit data to write. |
|
inlinestatic |
API to read 64-bit data from proxy.
Requirement: DOX_REQ_TAG(PDK-4156)
proxyAddr | [IN] Proxy data address (pre-calculated for a 64-bit read). |
data | [OUT] Pointer to 64-bit word where the data is read to. |