AM62x MCU+ SDK  10.01.00
udma_rm.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018-2021 Texas Instruments Incorporated
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
48 #ifndef UDMA_RM_H_
49 #define UDMA_RM_H_
50 
51 /* ========================================================================== */
52 /* Include Files */
53 /* ========================================================================== */
54 
55 /* None */
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60 
61 /* ========================================================================== */
62 /* Macros & Typedefs */
63 /* ========================================================================== */
64 
66 #define UDMA_RM_RES_ID_INVALID ((uint32_t) 0xFFFF0005U)
67 
69 #define UDMA_RM_SHARED_RES_CNT_MIN ((uint32_t) 0xFFFF0006U)
70 
72 #define UDMA_RM_SHARED_RES_CNT_REST ((uint32_t) 0xFFFF0007U)
73 
74 /* ========================================================================== */
75 /* Structure Declarations */
76 /* ========================================================================== */
77 
81 typedef struct
82 {
83  uint32_t resId;
85  uint32_t startResrvCnt;
88  uint32_t endResrvCnt;
91  uint32_t numInst;
97  uint32_t minReq;
117  uint32_t instShare[UDMA_RM_SHARED_RES_MAX_INST];
159 
171 typedef struct
172 {
176  uint32_t numBlkCopyUhcCh;
182  uint32_t numBlkCopyHcCh;
185  uint32_t startBlkCopyCh;
187  uint32_t numBlkCopyCh;
191  uint32_t startTxUhcCh;
194  uint32_t numTxUhcCh;
197  uint32_t startTxHcCh;
200  uint32_t numTxHcCh;
203  uint32_t startTxCh;
205  uint32_t numTxCh;
209  uint32_t startRxUhcCh;
212  uint32_t numRxUhcCh;
215  uint32_t startRxHcCh;
218  uint32_t numRxHcCh;
221  uint32_t startRxCh;
223  uint32_t numRxCh;
227 #if (UDMA_NUM_UTC_INSTANCE > 0)
228  uint32_t startUtcCh[UDMA_NUM_UTC_INSTANCE];
231  uint32_t numUtcCh[UDMA_NUM_UTC_INSTANCE];
234 #endif
235 
236 #if (UDMA_NUM_MAPPED_TX_GROUP > 0)
237  uint32_t startMappedTxCh[UDMA_NUM_MAPPED_TX_GROUP];
240  uint32_t numMappedTxCh[UDMA_NUM_MAPPED_TX_GROUP];
243 #endif
244 
245 #if (UDMA_NUM_MAPPED_RX_GROUP > 0)
246  uint32_t startMappedRxCh[UDMA_NUM_MAPPED_RX_GROUP];
249  uint32_t numMappedRxCh[UDMA_NUM_MAPPED_RX_GROUP];
252 #endif
253 
254 #if ((UDMA_NUM_MAPPED_TX_GROUP + UDMA_NUM_MAPPED_RX_GROUP) > 0)
255  uint32_t startMappedRing[UDMA_NUM_MAPPED_TX_GROUP + UDMA_NUM_MAPPED_RX_GROUP];
258  uint32_t numMappedRing[UDMA_NUM_MAPPED_TX_GROUP + UDMA_NUM_MAPPED_RX_GROUP];
261 #endif
262 
263  uint32_t startFreeFlow;
265  uint32_t numFreeFlow;
268  uint32_t startFreeRing;
270  uint32_t numFreeRing;
276  uint32_t numGlobalEvent;
279  uint32_t startVintr;
281  uint32_t numVintr;
284  uint32_t startIrIntr;
286  uint32_t numIrIntr;
296 
297 /* ========================================================================== */
298 /* Function Declarations */
299 /* ========================================================================== */
315 
316 /* ========================================================================== */
317 /* Static Function Definitions */
318 /* ========================================================================== */
319 
320 /* None */
321 
322 /* ========================================================================== */
323 /* Internal/Private Structure Declarations */
324 /* ========================================================================== */
325 
326 /* None */
327 
328 #ifdef __cplusplus
329 }
330 #endif
331 
332 #endif /* #ifndef UDMA_RM_H_ */
333 
Udma_RmInitPrms::numGlobalEvent
uint32_t numGlobalEvent
Definition: udma_rm.h:276
UDMA_RM_SHARED_RES_MAX_INST
#define UDMA_RM_SHARED_RES_MAX_INST
Maximum no.of instances to split a shared resource. This should be max(UDMA_NUM_CORE,...
Definition: udma_soc.h:296
Udma_RmInitPrms::numBlkCopyCh
uint32_t numBlkCopyCh
Definition: udma_rm.h:187
Udma_RmSharedResPrms::resId
uint32_t resId
Definition: udma_rm.h:83
Udma_RmInitPrms::startFreeRing
uint32_t startFreeRing
Definition: udma_rm.h:268
Udma_RmInitPrms::startTxCh
uint32_t startTxCh
Definition: udma_rm.h:203
Udma_RmInitPrms::startTxHcCh
uint32_t startTxHcCh
Definition: udma_rm.h:197
Udma_RmSharedResPrms::startResrvCnt
uint32_t startResrvCnt
Definition: udma_rm.h:85
Udma_RmInitPrms::startBlkCopyCh
uint32_t startBlkCopyCh
Definition: udma_rm.h:185
Udma_RmInitPrms::startVintr
uint32_t startVintr
Definition: udma_rm.h:279
Udma_RmInitPrms::startC7xCoreIntr
uint32_t startC7xCoreIntr
Definition: udma_rm.h:289
Udma_RmInitPrms::numFreeFlow
uint32_t numFreeFlow
Definition: udma_rm.h:265
Udma_RmInitPrms
UDMA resource manager init parameters.
Definition: udma_rm.h:172
Udma_RmInitPrms::numFreeRing
uint32_t numFreeRing
Definition: udma_rm.h:270
Udma_RmInitPrms::numBlkCopyHcCh
uint32_t numBlkCopyHcCh
Definition: udma_rm.h:182
Udma_RmInitPrms::startBlkCopyUhcCh
uint32_t startBlkCopyUhcCh
Definition: udma_rm.h:173
Udma_RmInitPrms::startRxHcCh
uint32_t startRxHcCh
Definition: udma_rm.h:215
Udma_RmInitPrms::startIrIntr
uint32_t startIrIntr
Definition: udma_rm.h:284
Udma_RmInitPrms::numTxCh
uint32_t numTxCh
Definition: udma_rm.h:205
Udma_RmInitPrms::startTxUhcCh
uint32_t startTxUhcCh
Definition: udma_rm.h:191
Udma_RmInitPrms::numRxUhcCh
uint32_t numRxUhcCh
Definition: udma_rm.h:212
UDMA_NUM_MAPPED_RX_GROUP
#define UDMA_NUM_MAPPED_RX_GROUP
Number of Mapped RX Group.
Definition: udma_soc.h:168
Udma_RmInitPrms::startGlobalEvent
uint32_t startGlobalEvent
Definition: udma_rm.h:274
Udma_RmSharedResPrms::endResrvCnt
uint32_t endResrvCnt
Definition: udma_rm.h:88
Udma_RmInitPrms::startRxUhcCh
uint32_t startRxUhcCh
Definition: udma_rm.h:209
Udma_rmGetSharedResPrms
Udma_RmSharedResPrms * Udma_rmGetSharedResPrms(uint32_t resId)
Returns the RM Shared Resource default parameters structure for the requested resource....
Udma_RmInitPrms::numTxUhcCh
uint32_t numTxUhcCh
Definition: udma_rm.h:194
Udma_RmSharedResPrms
UDMA resource manager shared resource parameters.
Definition: udma_rm.h:82
Udma_RmInitPrms::numRxHcCh
uint32_t numRxHcCh
Definition: udma_rm.h:218
UDMA_NUM_MAPPED_TX_GROUP
#define UDMA_NUM_MAPPED_TX_GROUP
Number of Mapped TX Group.
Definition: udma_soc.h:152
Udma_RmInitPrms::numBlkCopyUhcCh
uint32_t numBlkCopyUhcCh
Definition: udma_rm.h:176
Udma_RmInitPrms::startRxCh
uint32_t startRxCh
Definition: udma_rm.h:221
Udma_RmInitPrms::numTxHcCh
uint32_t numTxHcCh
Definition: udma_rm.h:200
Udma_RmInitPrms::numRxCh
uint32_t numRxCh
Definition: udma_rm.h:223
Udma_RmInitPrms::startFreeFlow
uint32_t startFreeFlow
Definition: udma_rm.h:263
Udma_RmInitPrms::numIrIntr
uint32_t numIrIntr
Definition: udma_rm.h:286
Udma_RmInitPrms::startBlkCopyHcCh
uint32_t startBlkCopyHcCh
Definition: udma_rm.h:179
Udma_RmSharedResPrms::numInst
uint32_t numInst
Definition: udma_rm.h:91
Udma_RmSharedResPrms::minReq
uint32_t minReq
Definition: udma_rm.h:97
Udma_RmInitPrms::numVintr
uint32_t numVintr
Definition: udma_rm.h:281