AM65x MCU+ SDK  09.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 
89 typedef struct
90 {
94  uint32_t numBlkCopyUhcCh;
97  uint32_t startBlkCopyHcCh;
100  uint32_t numBlkCopyHcCh;
103  uint32_t startBlkCopyCh;
105  uint32_t numBlkCopyCh;
109  uint32_t startTxUhcCh;
112  uint32_t numTxUhcCh;
115  uint32_t startTxHcCh;
118  uint32_t numTxHcCh;
121  uint32_t startTxCh;
123  uint32_t numTxCh;
127  uint32_t startRxUhcCh;
130  uint32_t numRxUhcCh;
133  uint32_t startRxHcCh;
136  uint32_t numRxHcCh;
139  uint32_t startRxCh;
141  uint32_t numRxCh;
144 #if (UDMA_NUM_MAPPED_TX_GROUP > 0)
145  uint32_t startMappedTxCh[UDMA_NUM_MAPPED_TX_GROUP];
148  uint32_t numMappedTxCh[UDMA_NUM_MAPPED_TX_GROUP];
151 #endif
152 
153 #if (UDMA_NUM_MAPPED_RX_GROUP > 0)
154  uint32_t startMappedRxCh[UDMA_NUM_MAPPED_RX_GROUP];
157  uint32_t numMappedRxCh[UDMA_NUM_MAPPED_RX_GROUP];
160 #endif
161 
162 #if ((UDMA_NUM_MAPPED_TX_GROUP + UDMA_NUM_MAPPED_RX_GROUP) > 0)
163  uint32_t startMappedRing[UDMA_NUM_MAPPED_TX_GROUP + UDMA_NUM_MAPPED_RX_GROUP];
166  uint32_t numMappedRing[UDMA_NUM_MAPPED_TX_GROUP + UDMA_NUM_MAPPED_RX_GROUP];
169 #endif
170 
171  uint32_t startFreeFlow;
173  uint32_t numFreeFlow;
176  uint32_t startFreeRing;
178  uint32_t numFreeRing;
184  uint32_t numGlobalEvent;
187  uint32_t startVintr;
189  uint32_t numVintr;
192  uint32_t startIrIntr;
194  uint32_t numIrIntr;
197  uint32_t proxyThreadNum;
221  uint32_t startProxy;
224  uint32_t numProxy;
227  uint32_t startRingMon;
229  uint32_t numRingMon;
233 
237 typedef struct
238 {
239  uint32_t resId;
241  uint32_t startResrvCnt;
244  uint32_t endResrvCnt;
247  uint32_t numInst;
253  uint32_t minReq;
273  uint32_t instShare[UDMA_RM_SHARED_RES_MAX_INST];
315 
316 /* ========================================================================== */
317 /* Function Declarations */
318 /* ========================================================================== */
334 
335 /* ========================================================================== */
336 /* Static Function Definitions */
337 /* ========================================================================== */
338 
339 /* None */
340 
341 /* ========================================================================== */
342 /* Internal/Private Structure Declarations */
343 /* ========================================================================== */
344 
345 /* None */
346 
347 #ifdef __cplusplus
348 }
349 #endif
350 
351 #endif /* #ifndef UDMA_RM_H_ */
352 
Udma_RmInitPrms::numGlobalEvent
uint32_t numGlobalEvent
Definition: udma_rm.h:184
Udma_RmInitPrms::numBlkCopyCh
uint32_t numBlkCopyCh
Definition: udma_rm.h:105
Udma_RmSharedResPrms::resId
uint32_t resId
Definition: udma_rm.h:239
Udma_RmInitPrms::startFreeRing
uint32_t startFreeRing
Definition: udma_rm.h:176
Udma_RmInitPrms::startTxCh
uint32_t startTxCh
Definition: udma_rm.h:121
UDMA_NUM_MAPPED_RX_GROUP
#define UDMA_NUM_MAPPED_RX_GROUP
Number of Mapped RX Group.
Definition: udma_soc.h:155
Udma_RmInitPrms::startTxHcCh
uint32_t startTxHcCh
Definition: udma_rm.h:115
Udma_RmSharedResPrms::startResrvCnt
uint32_t startResrvCnt
Definition: udma_rm.h:241
Udma_RmInitPrms::startBlkCopyCh
uint32_t startBlkCopyCh
Definition: udma_rm.h:103
Udma_RmInitPrms::startVintr
uint32_t startVintr
Definition: udma_rm.h:187
Udma_RmInitPrms::startProxy
uint32_t startProxy
Definition: udma_rm.h:221
Udma_RmInitPrms::numFreeFlow
uint32_t numFreeFlow
Definition: udma_rm.h:173
Udma_RmInitPrms
UDMA resource manager init parameters.
Definition: udma_rm.h:90
Udma_RmInitPrms::numFreeRing
uint32_t numFreeRing
Definition: udma_rm.h:178
UDMA_NUM_MAPPED_TX_GROUP
#define UDMA_NUM_MAPPED_TX_GROUP
Number of Mapped TX Group.
Definition: udma_soc.h:142
Udma_RmInitPrms::numBlkCopyHcCh
uint32_t numBlkCopyHcCh
Definition: udma_rm.h:100
Udma_RmInitPrms::startBlkCopyUhcCh
uint32_t startBlkCopyUhcCh
Definition: udma_rm.h:91
Udma_RmInitPrms::startRxHcCh
uint32_t startRxHcCh
Definition: udma_rm.h:133
Udma_RmInitPrms::startIrIntr
uint32_t startIrIntr
Definition: udma_rm.h:192
Udma_RmInitPrms::numTxCh
uint32_t numTxCh
Definition: udma_rm.h:123
Udma_RmInitPrms::startTxUhcCh
uint32_t startTxUhcCh
Definition: udma_rm.h:109
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:273
Udma_RmInitPrms::numRxUhcCh
uint32_t numRxUhcCh
Definition: udma_rm.h:130
Udma_RmInitPrms::startGlobalEvent
uint32_t startGlobalEvent
Definition: udma_rm.h:182
Udma_RmSharedResPrms::endResrvCnt
uint32_t endResrvCnt
Definition: udma_rm.h:244
Udma_RmInitPrms::startRxUhcCh
uint32_t startRxUhcCh
Definition: udma_rm.h:127
Udma_RmInitPrms::startRingMon
uint32_t startRingMon
Definition: udma_rm.h:227
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:112
Udma_RmInitPrms::numProxy
uint32_t numProxy
Definition: udma_rm.h:224
Udma_RmSharedResPrms
UDMA resource manager shared resource parameters.
Definition: udma_rm.h:238
Udma_RmInitPrms::numRxHcCh
uint32_t numRxHcCh
Definition: udma_rm.h:136
Udma_RmInitPrms::numBlkCopyUhcCh
uint32_t numBlkCopyUhcCh
Definition: udma_rm.h:94
Udma_RmInitPrms::numRingMon
uint32_t numRingMon
Definition: udma_rm.h:229
Udma_RmInitPrms::startRxCh
uint32_t startRxCh
Definition: udma_rm.h:139
Udma_RmInitPrms::numTxHcCh
uint32_t numTxHcCh
Definition: udma_rm.h:118
Udma_RmInitPrms::proxyThreadNum
uint32_t proxyThreadNum
Definition: udma_rm.h:197
Udma_RmInitPrms::numRxCh
uint32_t numRxCh
Definition: udma_rm.h:141
Udma_RmInitPrms::startFreeFlow
uint32_t startFreeFlow
Definition: udma_rm.h:171
Udma_RmInitPrms::numIrIntr
uint32_t numIrIntr
Definition: udma_rm.h:194
Udma_RmInitPrms::startBlkCopyHcCh
uint32_t startBlkCopyHcCh
Definition: udma_rm.h:97
Udma_RmSharedResPrms::numInst
uint32_t numInst
Definition: udma_rm.h:247
Udma_RmSharedResPrms::minReq
uint32_t minReq
Definition: udma_rm.h:253
Udma_RmInitPrms::numVintr
uint32_t numVintr
Definition: udma_rm.h:189