AM62L FreeRTOS SDK  11.00.00

Introduction

UDMA ring related parameters and API.

Go to the source code of this file.

Data Structures

struct  Udma_RingPrms
 UDMA ring parameters. More...
 
struct  Udma_RingObject
 Opaque UDMA ring object. More...
 

Macros

#define UDMA_RING_INVALID   ((uint16_t) (0xFFFFu))
 Macro used to specify that ring ID is invalid. Used in the API Udma_ringGetNum. More...
 
#define UDMA_RING_ANY   ((uint16_t) 0xFFFEU)
 Macro used to specify any available free ring while requesting one. Used in the API Udma_ringAlloc. More...
 
#define UDMA_RING_VIRTID_INVALID   ((uint16_t) 0xFFFFU)
 Macro used to specify that ring virt ID is invalid. Used in the API Udma_ringAlloc. More...
 
#define UDMA_RING_SIZE_CHECK_SKIP   (0xABDCABCDU)
 Macro used to skip the ring size check by driver. More...
 
#define UDMA_RING_ORDERID_MAX   (0x0FU)
 Macro used to specificy the maximum ring order id value. More...
 
#define UDMA_RING_MODE_CREDENTIALS   (0x2u)
 
#define UDMA_RING_MODE_QM   (0x3u)
 
UDMA Ring element size

Encoded ring element size to be programmed into the elsize field of the ring's RING_SIZE register. To calculate the encoded size use the formula (log2(size_bytes) - 2), where "size_bytes" cannot be greater than 256 bytes. This calculation is already taken care in below macro.

#define UDMA_RING_ES_4BYTES   ((uint8_t) 0x00U)
 4 bytes Element size More...
 
#define UDMA_RING_ES_8BYTES   ((uint8_t) 0x01U)
 8 bytes Element size More...
 
#define UDMA_RING_ES_16BYTES   ((uint8_t) 0x02U)
 16 bytes Element size More...
 
#define UDMA_RING_ES_32BYTES   ((uint8_t) 0x03U)
 32 bytes Element size More...
 
#define UDMA_RING_ES_64BYTES   ((uint8_t) 0x04U)
 64 bytes Element size More...
 
#define UDMA_RING_ES_128BYTES   ((uint8_t) 0x05U)
 128 bytes Element size More...
 
#define UDMA_RING_ES_256BYTES   ((uint8_t) 0x06U)
 256 bytes Element size More...
 

Functions

int32_t Udma_ringAlloc (Udma_DrvHandle drvHandle, Udma_RingHandle ringHandle, uint16_t ringNum, const Udma_RingPrms *ringPrms)
 UDMA ring allocation and configuration API. More...
 
int32_t Udma_ringFree (Udma_RingHandle ringHandle)
 UDMA free ring. More...
 
int32_t Udma_ringAttach (Udma_DrvHandle drvHandle, Udma_RingHandle ringHandle, uint16_t ringNum)
 UDMA ring attach API. This API is used to attach to an already allocated and configured ring. This API differs from ring alloc API in this aspect - it doesn't allocate resource from RM. More...
 
int32_t Udma_ringDetach (Udma_RingHandle ringHandle)
 UDMA detach ring API. More...
 
int32_t Udma_ringQueueRaw (Udma_RingHandle ringHandle, uint64_t phyDescMem)
 UDMA queue descriptor to a ring - raw version (Takes all physical pointers) More...
 
int32_t Udma_ringDequeueRaw (Udma_RingHandle ringHandle, uint64_t *phyDescMem)
 UDMA dequeue descriptor from a ring - raw version (Takes all physical pointers). More...
 
int32_t Udma_ringFlushRaw (Udma_RingHandle ringHandle, uint64_t *phyDescMem)
 UDMA dequeue descriptor from a ring when UDMA channel is disabled - raw version (Takes all physical pointers). More...
 
void Udma_ringPrime (Udma_RingHandle ringHandle, uint64_t phyDescMem)
 UDMA prime descriptor to a exposed/"RING" mode ring - raw version (Takes all physical pointers). This will write the descriptor to the ring memory without setting the doorbell (doesn't commit the push). More...
 
void Udma_ringPrimeRead (Udma_RingHandle ringHandle, uint64_t *phyDescMem)
 UDMA read descriptor from a exposed/"RING" mode ring - raw version (Reads physical pointers). This will read the descriptor address from the ring memory without setting the doorbell (doesn't commit the pop). More...
 
void Udma_ringSetDoorBell (Udma_RingHandle ringHandle, int32_t count)
 UDMA ring API to set the doorbell in exposed/"RING" mode ring. This will commit the previously primed operation using Udma_ringPrime API. More...
 
uint16_t Udma_ringGetNum (Udma_RingHandle ringHandle)
 Returns the ring number allocated for this ring. More...
 
void * Udma_ringGetMemPtr (Udma_RingHandle ringHandle)
 Returns the ring memory pointer which is passed during ring alloc. More...
 
uint32_t Udma_ringGetMode (Udma_RingHandle ringHandle)
 Returns the ring mode which is configured during ring alloc. More...
 
uint32_t Udma_ringGetElementCnt (Udma_RingHandle ringHandle)
 Returns the ring element count which is passed during ring alloc. More...
 
uint32_t Udma_ringGetForwardRingOcc (Udma_RingHandle ringHandle)
 Returns the forward ring occupancy. More...
 
uint32_t Udma_ringGetReverseRingOcc (Udma_RingHandle ringHandle)
 Returns the reverse ring occupancy. More...
 
uint32_t Udma_ringGetWrIdx (Udma_RingHandle ringHandle)
 Returns the ring write index value. More...
 
uint32_t Udma_ringGetRdIdx (Udma_RingHandle ringHandle)
 Returns the ring read index value. More...
 
void UdmaRingPrms_init (Udma_RingPrms *ringPrms)
 Udma_RingPrms structure init function. More...