This is UDMA driver utilty parameters and API
|
file | udma_utils.h |
| UDMA utility API to make TR, get TR descriptor memory requirement.
|
|
|
#define | UDMA_GET_TRPD_TR15_SIZE(n) (UDMA_ALIGN_SIZE(sizeof(CSL_UdmapTR15) + ((n) * (sizeof(CSL_UdmapTR15) + 4U)))) |
| UDMA TR15 packet descriptor memory size in bytes. This contains the CSL_UdmapCppi5TRPD + Padding to sizeof(CSL_UdmapTR15) + N* Type_15 TR (CSL_UdmapTR15) + N* TR response of 4 bytes. Since CSL_UdmapCppi5TRPD header is less than CSL_UdmapTR15, CSL_UdmapTR15 itself is used for size alignment. More...
|
|
#define | UDMA_TR1_OFFSET (64U) |
| Offset for TR1 type TR from TRPD start address. More...
|
|
◆ UDMA_TR_TYPE_0
◆ UDMA_TR_TYPE_1
◆ UDMA_TR_TYPE_2
◆ UDMA_TR_TYPE_3
◆ UDMA_TR_TYPE_4
◆ UDMA_TR_TYPE_5
◆ UDMA_TR_TYPE_8
◆ UDMA_TR_TYPE_9
◆ UDMA_TR_TYPE_10
◆ UDMA_TR_TYPE_11
◆ UDMA_TR_TYPE_15
◆ UDMA_GET_TRPD_TR15_SIZE
#define UDMA_GET_TRPD_TR15_SIZE |
( |
|
n | ) |
(UDMA_ALIGN_SIZE(sizeof(CSL_UdmapTR15) + ((n) * (sizeof(CSL_UdmapTR15) + 4U)))) |
UDMA TR15 packet descriptor memory size in bytes. This contains the CSL_UdmapCppi5TRPD + Padding to sizeof(CSL_UdmapTR15) + N* Type_15 TR (CSL_UdmapTR15) + N* TR response of 4 bytes. Since CSL_UdmapCppi5TRPD header is less than CSL_UdmapTR15, CSL_UdmapTR15 itself is used for size alignment.
n - Number of TR's present in the TRPD
◆ UDMA_TR1_OFFSET
#define UDMA_TR1_OFFSET (64U) |
Offset for TR1 type TR from TRPD start address.
◆ UdmaUtils_getRingMemSize()
uint32_t UdmaUtils_getRingMemSize |
( |
uint8_t |
mode, |
|
|
uint32_t |
elemCnt, |
|
|
uint8_t |
elemSize |
|
) |
| |
UDMA get ring size utility API.
- Parameters
-
- Returns
- Size of the ring memory required in bytes
◆ UdmaUtils_makeTrpd()
static void UdmaUtils_makeTrpd |
( |
void * |
pTrpd, |
|
|
uint32_t |
trType, |
|
|
uint32_t |
trCnt, |
|
|
uint32_t |
cqRingNum |
|
) |
| |
|
inlinestatic |
UDMA utility API to make TRPD. Other TRPD make APIs should be called only after this API.
Note: This sets the most commonly used value for all the fields. User can override the fields after calling this API if required.
- Parameters
-
pTrpd | [IN] Pointer to TRPD memory |
trType | [IN] TR type. Refer Udma_TrType |
trCnt | [IN] Number of TR entries present in the TRPD |
cqRingNum | [IN] Completion ring number where the TRPD is returned after processing |
◆ UdmaUtils_getTrSizeEncoded()
uint32_t UdmaUtils_getTrSizeEncoded |
( |
uint32_t |
trType | ) |
|
Returns the size of TR (encoded) based on the type.
- Parameters
-
- Returns
- Size of the TR record in encoded value to be programmed in TRPD.
◆ UdmaUtils_getTrSizeBytes()
uint32_t UdmaUtils_getTrSizeBytes |
( |
uint32_t |
trType | ) |
|
Returns the size of TR in bytes based on the type.
- Parameters
-
- Returns
- Size of the TR record in bytes.
◆ UdmaUtils_getTrpdTr1Pointer()
CSL_UdmapTR1* UdmaUtils_getTrpdTr1Pointer |
( |
uint8_t * |
trpdMem, |
|
|
uint32_t |
trIndex |
|
) |
| |
Returns the TR1 pointer in the TRPD memory based on the index.
- Parameters
-
trpdMem | [IN] TRPD memory pointer |
trIndex | [IN] Index to the TR to get the TR1 pointer address |
- Returns
- TR1 pointer address