This is UDMA driver RX flow related configuration parameters and API
Files | |
file | udma_flow.h |
UDMA flow related parameters and API. | |
Data Structures | |
struct | Udma_FlowPrms |
UDMA RX channel flow parameters. More... | |
struct | Udma_FlowAllocMappedPrms |
UDMA RX channel mapped flow alloc parameters. More... | |
struct | Udma_FlowObject |
Opaque UDMA flow object. More... | |
Functions | |
int32_t | Udma_flowAllocMapped (Udma_DrvHandle drvHandle, Udma_FlowHandle flowHandle, const Udma_FlowAllocMappedPrms *flowAllocMappedPrms) |
UDMA mapped flow allocation API. In devices like AM64x, flows are tied to channels. This API is used to allocate a single flow from the mapped free flows which are dedicated for a particular channel. More... | |
int32_t | Udma_flowFree (Udma_FlowHandle flowHandle) |
UDMA free flows. More... | |
int32_t | Udma_flowAttach (Udma_DrvHandle drvHandle, Udma_FlowHandle flowHandle, uint32_t flowStart, uint32_t flowCnt) |
UDMA flow attach API. This API is used to attach to an already allocated flow. This API differs from flow alloc API in this aspect - it doesn't allocate resource from RM. Once the flow is attached to, Udma_flowConfig API can be used to configure the flow through sciclient/DMSC API. More... | |
int32_t | Udma_flowAttachMapped (Udma_DrvHandle drvHandle, Udma_FlowHandle flowHandle, uint32_t mappepdFlowNum, const Udma_FlowAllocMappedPrms *flowAllocMappedPrms) |
UDMA mapped flow attach API. This API is used to attach to an already allocated mapped flow. This API differs from mapped flow alloc API in this aspect - it doesn't allocate resource from RM. Once the flow is attached to, Udma_flowConfig API can be used to configure the flow through sciclient/DMSC API. More... | |
int32_t | Udma_flowDetach (Udma_FlowHandle flowHandle) |
UDMA flow detach API. More... | |
int32_t | Udma_flowConfig (Udma_FlowHandle flowHandle, uint32_t flowIdx, const Udma_FlowPrms *flowPrms) |
This API configures the flow configurations. More... | |
uint32_t | Udma_flowGetNum (Udma_FlowHandle flowHandle) |
Returns the start flow number managed by this flow handle. More... | |
uint32_t | Udma_flowGetCount (Udma_FlowHandle flowHandle) |
Returns the number of flows managed by this flow handle. More... | |
void | UdmaFlowPrms_init (Udma_FlowPrms *flowPrms, uint32_t chType) |
Udma_FlowPrms structure init function. More... | |
Macros | |
#define | UDMA_DEFAULT_FLOW_ID (0x3FFFU) |
Default flow ID. More... | |
#define | UDMA_FLOW_INVALID ((uint32_t) 0xFFFF0000U) |
Macro used to specify that flow ID is invalid. More... | |
#define UDMA_DEFAULT_FLOW_ID (0x3FFFU) |
Default flow ID.
#define UDMA_FLOW_INVALID ((uint32_t) 0xFFFF0000U) |
Macro used to specify that flow ID is invalid.
int32_t Udma_flowAllocMapped | ( | Udma_DrvHandle | drvHandle, |
Udma_FlowHandle | flowHandle, | ||
const Udma_FlowAllocMappedPrms * | flowAllocMappedPrms | ||
) |
UDMA mapped flow allocation API. In devices like AM64x, flows are tied to channels. This API is used to allocate a single flow from the mapped free flows which are dedicated for a particular channel.
Note: Allocation of mapped flows have to be done after Udma_chOpen, Since the mapped flow have to be allocated from the dedicated flows for the particular channel.
drvHandle | [IN] UDMA driver handle pointer passed during Udma_init |
flowHandle | [IN/OUT] UDMA flow 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. |
flowAllocMappedPrms | [IN] UDMA mapped flow alloc parameters. This parameter can't be NULL. |
int32_t Udma_flowFree | ( | Udma_FlowHandle | flowHandle | ) |
UDMA free flows.
Freeup the flow resources.
Note: This API can be used to free mapped flow also, which are allocated using Udma_flowAllocMapped.
flowHandle | [IN] UDMA flow handle. This parameter can't be NULL. |
int32_t Udma_flowAttach | ( | Udma_DrvHandle | drvHandle, |
Udma_FlowHandle | flowHandle, | ||
uint32_t | flowStart, | ||
uint32_t | flowCnt | ||
) |
UDMA flow attach API. This API is used to attach to an already allocated flow. This API differs from flow alloc API in this aspect - it doesn't allocate resource from RM. Once the flow is attached to, Udma_flowConfig API can be used to configure the flow through sciclient/DMSC API.
Requirement: DOX_REQ_TAG(PDK-3418)
drvHandle | [IN] UDMA driver handle pointer passed during Udma_init |
flowHandle | [IN/OUT] UDMA flow 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. |
flowStart | [IN] Flow index to attach to. This paramter should be a valid flow number allowed to be used by a core. The driver doesn't check the validity of this field at the time of attach. But the flow config API may fail if wrong flow index is used or when the core doesn't own the flow as per DMSC board config. |
flowCnt | [IN] Flow count - to attach to more than 1 flow which is contiguous from flow start. This is provided to allow a single handle to manage multiple contiguous flows |
int32_t Udma_flowAttachMapped | ( | Udma_DrvHandle | drvHandle, |
Udma_FlowHandle | flowHandle, | ||
uint32_t | mappepdFlowNum, | ||
const Udma_FlowAllocMappedPrms * | flowAllocMappedPrms | ||
) |
UDMA mapped flow attach API. This API is used to attach to an already allocated mapped flow. This API differs from mapped flow alloc API in this aspect - it doesn't allocate resource from RM. Once the flow is attached to, Udma_flowConfig API can be used to configure the flow through sciclient/DMSC API.
Requirement: DOX_REQ_TAG(PDK-3418)
drvHandle | [IN] UDMA driver handle pointer passed during Udma_init |
flowHandle | [IN/OUT] UDMA flow 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. |
mappepdFlowNum | [IN] Mapped flow index to attach to. This paramter should be a valid mapped flow number allowed to be used by a core and by the mapped channel. The driver doesn't check the validity of this field at the time of attach. But the flow config API may fail if wrong mapped flow index is used or when the core doesn't own the mapped flow as per DMSC board config or if the mapped flow dosen't belong to the deicated flows for the particular channel. |
flowAllocMappedPrms | [IN] UDMA mapped flow alloc parameters. This parameter can't be NULL. |
int32_t Udma_flowDetach | ( | Udma_FlowHandle | flowHandle | ) |
UDMA flow detach API.
Since no allocation is done in attach, this API just clears up the flow handle.
Note: This API can be used to detach mapped flow also, which are attached using Udma_flowAttachMapped.
Requirement: DOX_REQ_TAG(PDK-3418)
flowHandle | [IN] UDMA flow handle. This parameter can't be NULL. |
int32_t Udma_flowConfig | ( | Udma_FlowHandle | flowHandle, |
uint32_t | flowIdx, | ||
const Udma_FlowPrms * | flowPrms | ||
) |
This API configures the flow configurations.
Requirement: DOX_REQ_TAG(PDK-2599)
flowHandle | [IN] UDMA flow handle pointer |
flowIdx | [IN] Since multiple flows are allocated and also contiguously, all the flows needs to be configured one after the other. This is the relative index from the start of the flow allocated. If the index goes beyond what is allocated, then the function returns error. Note: In case of configuring the default flow and mapped flow(in devices like AM64x), this should be set to "zero". |
flowPrms | [IN] Pointer to flow configuration. |
uint32_t Udma_flowGetNum | ( | Udma_FlowHandle | flowHandle | ) |
Returns the start flow number managed by this flow handle.
Note: In case off mapped flow(in devices like AM64x), this returns the mapped flow number.
flowHandle | [IN] UDMA flow handle. This parameter can't be NULL. |
uint32_t Udma_flowGetCount | ( | Udma_FlowHandle | flowHandle | ) |
Returns the number of flows managed by this flow handle.
Note: In case of mapped flow(in devices like AM64x), this always returns 1, since only one mapped flow is managed by a flow handle.
Requirement: DOX_REQ_TAG(PDK-3718)
flowHandle | [IN] UDMA flow handle. This parameter can't be NULL. |
void UdmaFlowPrms_init | ( | Udma_FlowPrms * | flowPrms, |
uint32_t | chType | ||
) |
Udma_FlowPrms structure init function.
flowPrms | [IN] Pointer to Udma_FlowPrms structure. |
chType | [IN] UDMA channel type. Refer Udma_ChType. |