AM65x MCU+ SDK  09.01.00
udma_cfg.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023 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 
47 #ifndef UDMA_CFG_H_
48 #define UDMA_CFG_H_
49 
50 /* ========================================================================== */
51 /* Include Files */
52 /* ========================================================================== */
53 
54 /* None */
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
60 /* ========================================================================== */
61 /* Macros & Typedefs */
62 /* ========================================================================== */
63 
74 #define UDMA_RM_MAX_BLK_COPY_CH (32U)
75 #define UDMA_RM_MAX_BLK_COPY_HC_CH (32U)
76 #define UDMA_RM_MAX_BLK_COPY_UHC_CH (32U)
77 #define UDMA_RM_MAX_TX_CH (256U)
78 #define UDMA_RM_MAX_TX_HC_CH (32U)
79 #define UDMA_RM_MAX_TX_UHC_CH (32U)
80 #define UDMA_RM_MAX_RX_CH (256U)
81 #define UDMA_RM_MAX_RX_HC_CH (32U)
82 #define UDMA_RM_MAX_RX_UHC_CH (32U)
83 #define UDMA_RM_MAX_UTC_CH_PER_INST (64U)
84 #define UDMA_RM_MAX_MAPPED_TX_CH_PER_GROUP (32U)
85 #define UDMA_RM_MAX_MAPPED_RX_CH_PER_GROUP (32U)
86 #define UDMA_RM_MAX_MAPPED_RING_PER_GROUP (64U)
87 #define UDMA_RM_MAX_FREE_RING (1024U)
88 #define UDMA_RM_MAX_FREE_FLOW (256U)
89 #define UDMA_RM_MAX_GLOBAL_EVENT (1024U)
90 #define UDMA_RM_MAX_VINTR (512U)
91 #define UDMA_RM_MAX_IR_INTR (128U)
92 #define UDMA_RM_MAX_PROXY (32U)
93 #define UDMA_RM_MAX_RING_MON (32U)
94 
95 /* Array allocation macros */
96 #define UDMA_RM_BLK_COPY_CH_ARR_SIZE (UDMA_RM_MAX_BLK_COPY_CH >> 5U)
97 #define UDMA_RM_BLK_COPY_HC_CH_ARR_SIZE (UDMA_RM_MAX_BLK_COPY_HC_CH >> 5U)
98 #define UDMA_RM_BLK_COPY_UHC_CH_ARR_SIZE (UDMA_RM_MAX_BLK_COPY_UHC_CH >> 5U)
99 #define UDMA_RM_TX_CH_ARR_SIZE (UDMA_RM_MAX_TX_CH >> 5U)
100 #define UDMA_RM_TX_HC_CH_ARR_SIZE (UDMA_RM_MAX_TX_HC_CH >> 5U)
101 #define UDMA_RM_TX_UHC_CH_ARR_SIZE (UDMA_RM_MAX_TX_UHC_CH >> 5U)
102 #define UDMA_RM_RX_CH_ARR_SIZE (UDMA_RM_MAX_RX_CH >> 5U)
103 #define UDMA_RM_RX_HC_CH_ARR_SIZE (UDMA_RM_MAX_RX_HC_CH >> 5U)
104 #define UDMA_RM_RX_UHC_CH_ARR_SIZE (UDMA_RM_MAX_RX_UHC_CH >> 5U)
105 #define UDMA_RM_UTC_CH_ARR_SIZE (UDMA_RM_MAX_UTC_CH_PER_INST >> 5U)
106 #define UDMA_RM_MAPPED_TX_CH_ARR_SIZE (UDMA_RM_MAX_MAPPED_TX_CH_PER_GROUP >> 5U)
107 #define UDMA_RM_MAPPED_RX_CH_ARR_SIZE (UDMA_RM_MAX_MAPPED_RX_CH_PER_GROUP >> 5U)
108 #define UDMA_RM_MAPPED_RING_ARR_SIZE (UDMA_RM_MAX_MAPPED_RING_PER_GROUP >> 5U)
109 #define UDMA_RM_FREE_RING_ARR_SIZE (UDMA_RM_MAX_FREE_RING >> 5U)
110 #define UDMA_RM_FREE_FLOW_ARR_SIZE (UDMA_RM_MAX_FREE_FLOW >> 5U)
111 #define UDMA_RM_GLOBAL_EVENT_ARR_SIZE (UDMA_RM_MAX_GLOBAL_EVENT >> 5U)
112 #define UDMA_RM_VINTR_ARR_SIZE (UDMA_RM_MAX_VINTR >> 5U)
113 #define UDMA_RM_IR_INTR_ARR_SIZE (UDMA_RM_MAX_IR_INTR >> 5U)
114 #define UDMA_RM_PROXY_ARR_SIZE (UDMA_RM_MAX_PROXY >> 5U)
115 #define UDMA_RM_RING_MON_ARR_SIZE (UDMA_RM_MAX_RING_MON >> 5U)
116 
119 #define UDMA_DEFAULT_RM_PROXY_THREAD_START (4U)
120 
122 #define UDMA_DEFAULT_RING_ORDER_ID (0U)
123 
125 #define UDMA_DEFAULT_TX_CH_DMA_PRIORITY \
126  (TISCI_MSG_VALUE_RM_UDMAP_CH_SCHED_PRIOR_MEDHIGH)
127 
128 #define UDMA_DEFAULT_RX_CH_DMA_PRIORITY \
129  (TISCI_MSG_VALUE_RM_UDMAP_CH_SCHED_PRIOR_MEDHIGH)
130 
131 #define UDMA_DEFAULT_UTC_CH_DMA_PRIORITY \
132  (TISCI_MSG_VALUE_RM_UDMAP_CH_SCHED_PRIOR_MEDHIGH)
133 
135 #define UDMA_DEFAULT_TX_CH_BUS_PRIORITY (4U)
136 
137 #define UDMA_DEFAULT_RX_CH_BUS_PRIORITY (4U)
138 
139 #define UDMA_DEFAULT_UTC_CH_BUS_PRIORITY (4U)
140 
142 #define UDMA_DEFAULT_TX_CH_BUS_QOS (4U)
143 
144 #define UDMA_DEFAULT_RX_CH_BUS_QOS (4U)
145 
146 #define UDMA_DEFAULT_UTC_CH_BUS_QOS (4U)
147 
149 #define UDMA_DEFAULT_TX_CH_BUS_ORDERID (0U)
150 
151 #define UDMA_DEFAULT_RX_CH_BUS_ORDERID (0U)
152 
153 #define UDMA_DEFAULT_UTC_CH_BUS_ORDERID (0U)
154 
156 #define UDMA_CFG_PRINT_BUF_LEN ((uint32_t) 1024U)
157 
159 #define UDMA_DEFAULT_CH_DISABLE_TIMEOUT (100U)
160 
161 /* ========================================================================== */
162 /* Structure Declarations */
163 /* ========================================================================== */
164 
165 /* None */
166 
167 /* ========================================================================== */
168 /* Function Declarations */
169 /* ========================================================================== */
170 
171 /* None */
172 
173 /* ========================================================================== */
174 /* Static Function Definitions */
175 /* ========================================================================== */
176 
177 /* None */
178 
179 #ifdef __cplusplus
180 }
181 #endif
182 
183 #endif /* #ifndef UDMA_CFG_H_ */
184