![]() |
![]() |
Typedefs | |
typedef enum CpswUtils_DescStateMemMgr_e | CpswUtils_DescStateMemMgr |
CPSW DMA Descriptor state. More... | |
typedef enum CpswUtils_PktStateApp_e | CpswUtils_PktStateApp |
App Pkt state. More... | |
typedef enum CpswUtils_PktStateDma_e | CpswUtils_PktStateDma |
DMA Pkt state. More... | |
typedef enum CpswUtils_PktStateMemMgr_e | CpswUtils_PktStateMemMgr |
CPSW DMA Pkt state. More... | |
typedef enum CpswUtils_PktStateModuleType_e | CpswUtils_PktStateModuleType |
CPSW DMA Pkt state. More... | |
Enumerations | |
enum | CpswUtils_DescStateMemMgr_e { CPSW_DESCSTATE_MEMMGR_FREE = 0U, CPSW_DESCSTATE_MEMMGR_ALLOC } |
CPSW DMA Descriptor state. More... | |
enum | CpswUtils_PktStateApp_e { CPSW_PKTSTATE_APP_WITH_FREEQ = 0U, CPSW_PKTSTATE_APP_WITH_READYQ, CPSW_PKTSTATE_APP_WITH_DRIVER } |
App Pkt state. More... | |
enum | CpswUtils_PktStateDma_e { CPSW_PKTSTATE_DMA_WITH_HW = 0U, CPSW_PKTSTATE_DMA_NOT_WITH_HW } |
DMA Pkt state. More... | |
enum | CpswUtils_PktStateMemMgr_e { CPSW_PKTSTATE_MEMMGR_FREE = 0U, CPSW_PKTSTATE_MEMMGR_ALLOC } |
CPSW DMA Pkt state. More... | |
enum | CpswUtils_PktStateModuleType_e { CPSW_PKTSTATE_MODULE_APP = 0U, CPSW_PKTSTATE_MODULE_DRIVER, CPSW_PKTSTATE_MODULE_MEMUTILS } |
CPSW DMA Pkt state. More... | |
Functions | |
void | CpswUtils_checkPktState (uint32_t *pStateVar, CpswUtils_PktStateModuleType module, uint32_t expectedState, uint32_t newState) |
Packet state check & set API for app, memory manager and dma driver. More... | |
void | CpswUtils_checkDescState (uint32_t *pStateVar, CpswUtils_DescStateMemMgr expectedState, CpswUtils_DescStateMemMgr newState) |
Descriptor state check & set API for descriptor memory manager. More... | |
#define CPSW_UTILS_GET_DESC_MEMUTILS_STATE | ( | state | ) |
#define CPSW_UTILS_GET_PKT_APP_STATE | ( | state | ) |
#define CPSW_UTILS_GET_PKT_DRIVER_STATE | ( | state | ) |
#define CPSW_UTILS_GET_PKT_MEMUTILS_STATE | ( | state | ) |
#define CPSW_UTILS_GET_STATE | ( | state, | |
mask, | |||
bitshift | |||
) |
#define CPSW_UTILS_SET_DESC_MEMUTILS_STATE | ( | state, | |
value | |||
) |
#define CPSW_UTILS_SET_PKT_APP_STATE | ( | state, | |
value | |||
) |
#define CPSW_UTILS_SET_PKT_DRIVER_STATE | ( | state, | |
value | |||
) |
#define CPSW_UTILS_SET_PKT_MEMUTILS_STATE | ( | state, | |
value | |||
) |
#define CPSW_UTILS_SET_STATE | ( | state, | |
mask, | |||
bitshift, | |||
value | |||
) |
typedef enum CpswUtils_DescStateMemMgr_e CpswUtils_DescStateMemMgr |
CPSW DMA Descriptor state.
DMA descriptor state used by CPSW DMA driver for sanity check.
typedef enum CpswUtils_PktStateApp_e CpswUtils_PktStateApp |
App Pkt state.
Packet state for application
typedef enum CpswUtils_PktStateDma_e CpswUtils_PktStateDma |
DMA Pkt state.
Packet state for DMA
typedef enum CpswUtils_PktStateMemMgr_e CpswUtils_PktStateMemMgr |
CPSW DMA Pkt state.
Packet state for memory manager
CPSW DMA Pkt state.
Type of CPSW DMA Pkt state.
void CpswUtils_checkDescState | ( | uint32_t * | pStateVar, |
CpswUtils_DescStateMemMgr | expectedState, | ||
CpswUtils_DescStateMemMgr | newState | ||
) |
Descriptor state check & set API for descriptor memory manager.
This development time API checks expected state and sets new descriptor state. This is used by modules handling the Desc to confirm the Desc is returned and allocated in correct state. Only memutils modules uses it now for checking if desc is free or allocated while allocating or freeing desc respectively.
pStateVar | [IN/OUT] Pointer to Desc state variable. |
expectedState | [IN] State Desc is expected to be. |
newState | [IN] New state Desc is set to. |
void CpswUtils_checkPktState | ( | uint32_t * | pStateVar, |
CpswUtils_PktStateModuleType | module, | ||
uint32_t | expectedState, | ||
uint32_t | newState | ||
) |
Packet state check & set API for app, memory manager and dma driver.
This development time API checks expected state and sets new packet state. This is used by modules handling the packet to confirm the packet is returned and allocated in correct state. Memutils checks (free, allocated), dma driver checks (with Hw, with driver) and app checks which Q it belongs
pStateVar | [IN/OUT] Pointer to packet state variable of packet structure CpswDma_PktInfo |
module | [IN] Module id. Refer to CpswUtils_PktStateModuleType |
expectedState | [IN] State packet is expected to be. |
newState | [IN] New state packet is set to. |