AM261x MCU+ SDK: sdlr_tog.h Source File

| AM261x MCU+ SDK 26.00.00 |

stog/v0/sdlr_tog.h
Go to the documentation of this file.
1 /********************************************************************
2 * Copyright (C) 2021-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 * Name : sdlr_tog.h
33 */
34 #ifndef SDLR_TOG_H_
35 #define SDLR_TOG_H_
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 #include <stdint.h>
42 #include <sdl/sdlr.h>
43 #include <sdl/include/sdl_types.h>
44 #include "sdl_ip_tog.h"
45 #include "sdl_tog.h"
46 #include <sdl/stog/v0/soc/sdl_tog_soc.h>
47
48 /**************************************************************************
49 * Hardware Region : Timeout Gasket Registers
50 **************************************************************************/
51
52
53 /**************************************************************************
54 * Register Overlay Structure
55 **************************************************************************/
56
57 typedef struct {
58 volatile uint32_t PID; /* Revision Register */
59 volatile uint32_t CFG; /* Configuration Register */
60 volatile uint32_t INFO; /* Info Register */
61 volatile uint32_t ENABLE; /* Enable Register */
62 volatile uint32_t FLUSH; /* Flush Register */
63 volatile uint32_t TIMEOUT; /* Timeout Value Register */
64 volatile uint32_t TIMER; /* Timer Register */
65 volatile uint8_t Resv_32[4];
66 volatile uint32_t ERR_RAW; /* Error Interrupt Raw Status/Set Register */
67 volatile uint32_t ERR; /* Error Interrupt Enabled Status/Set Register */
68 volatile uint32_t ERR_MSK_SET; /* Error Interrupt Mask Set Register */
69 volatile uint32_t ERR_MSK_CLR; /* Error Interrupt Mask Set Register */
70 volatile uint32_t ERR_TM_INFO; /* Timeout Error Info Register */
71 volatile uint32_t ERR_UN_INFO; /* Unexpected Error Info Register */
72 volatile uint32_t ERR_VAL; /* Error Transaction Valid/Dir/RouteID Register */
73 volatile uint32_t ERR_TAG; /* Error Transaction Tag/CommandID Register */
74 volatile uint32_t ERR_BYT; /* Error Transaction Bytecnt Register */
75 volatile uint32_t ERR_ADDR_U; /* Error Upper Address Register */
76 volatile uint32_t ERR_ADDR_L; /* Error Upper Address Register */
77 } SDL_TOG_Regs;
78
79 /**************************************************************************
80 * Register Macros
81 **************************************************************************/
82
83 #define SDL_TOG_PID (0x00000000U)
84 #define SDL_TOG_CFG (0x00000004U)
85 #define SDL_TOG_INFO (0x00000008U)
86 #define SDL_TOG_ENABLE (0x0000000CU)
87 #define SDL_TOG_FLUSH (0x00000010U)
88 #define SDL_TOG_TIMEOUT (0x00000014U)
89 #define SDL_TOG_TIMER (0x00000018U)
90 #define SDL_TOG_ERR_RAW (0x00000020U)
91 #define SDL_TOG_ERR (0x00000024U)
92 #define SDL_TOG_ERR_MSK_SET (0x00000028U)
93 #define SDL_TOG_ERR_MSK_CLR (0x0000002CU)
94 #define SDL_TOG_ERR_TM_INFO (0x00000030U)
95 #define SDL_TOG_ERR_UN_INFO (0x00000034U)
96 #define SDL_TOG_ERR_VAL (0x00000038U)
97 #define SDL_TOG_ERR_TAG (0x0000003CU)
98 #define SDL_TOG_ERR_BYT (0x00000040U)
99 #define SDL_TOG_ERR_ADDR_U (0x00000044U)
100 #define SDL_TOG_ERR_ADDR_L (0x00000048U)
101
102 /**************************************************************************
103 * Field Definition Macros
104 **************************************************************************/
105
106
107 /* PID */
108
109 #define SDL_TOG_PID_MINOR_MASK (0x0000003FU)
110 #define SDL_TOG_PID_MINOR_SHIFT (0x00000000U)
111 #define SDL_TOG_PID_MINOR_MAX (0x0000003FU)
112
113 #define SDL_TOG_PID_CUSTOM_MASK (0x000000C0U)
114 #define SDL_TOG_PID_CUSTOM_SHIFT (0x00000006U)
115 #define SDL_TOG_PID_CUSTOM_MAX (0x00000003U)
116
117 #define SDL_TOG_PID_MAJOR_MASK (0x00000700U)
118 #define SDL_TOG_PID_MAJOR_SHIFT (0x00000008U)
119 #define SDL_TOG_PID_MAJOR_MAX (0x00000007U)
120
121 #define SDL_TOG_PID_RTL_MASK (0x0000F800U)
122 #define SDL_TOG_PID_RTL_SHIFT (0x0000000BU)
123 #define SDL_TOG_PID_RTL_MAX (0x0000001FU)
124
125 #define SDL_TOG_PID_FUNC_MASK (0x0FFF0000U)
126 #define SDL_TOG_PID_FUNC_SHIFT (0x00000010U)
127 #define SDL_TOG_PID_FUNC_MAX (0x00000FFFU)
128
129 #define SDL_TOG_PID_BU_MASK (0x30000000U)
130 #define SDL_TOG_PID_BU_SHIFT (0x0000001CU)
131 #define SDL_TOG_PID_BU_MAX (0x00000003U)
132
133 #define SDL_TOG_PID_SCHEME_MASK (0xC0000000U)
134 #define SDL_TOG_PID_SCHEME_SHIFT (0x0000001EU)
135 #define SDL_TOG_PID_SCHEME_MAX (0x00000003U)
136
137 /* CFG */
138
139 #define SDL_TOG_CFG_NUM_WRITES_MASK (0x00FF0000U)
140 #define SDL_TOG_CFG_NUM_WRITES_SHIFT (0x00000010U)
141 #define SDL_TOG_CFG_NUM_WRITES_MAX (0x000000FFU)
142
143 #define SDL_TOG_CFG_NUM_READS_MASK (0x000000FFU)
144 #define SDL_TOG_CFG_NUM_READS_SHIFT (0x00000000U)
145 #define SDL_TOG_CFG_NUM_READS_MAX (0x000000FFU)
146
147 /* INFO */
148
149 #define SDL_TOG_INFO_CUR_WRITES_MASK (0x01FF0000U)
150 #define SDL_TOG_INFO_CUR_WRITES_SHIFT (0x00000010U)
151 #define SDL_TOG_INFO_CUR_WRITES_MAX (0x000001FFU)
152
153 #define SDL_TOG_INFO_CUR_READS_MASK (0x000001FFU)
154 #define SDL_TOG_INFO_CUR_READS_SHIFT (0x00000000U)
155 #define SDL_TOG_INFO_CUR_READS_MAX (0x000001FFU)
156
157 /* ENABLE */
158
159 #define SDL_TOG_ENABLE_EN_MASK (0x0000000FU)
160 #define SDL_TOG_ENABLE_EN_SHIFT (0x00000000U)
161 #define SDL_TOG_ENABLE_EN_MAX (0x0000000FU)
162
163 /* FLUSH */
164
165 #define SDL_TOG_FLUSH_EXT_FL_MASK (0x80000000U)
166 #define SDL_TOG_FLUSH_EXT_FL_SHIFT (0x0000001FU)
167 #define SDL_TOG_FLUSH_EXT_FL_MAX (0x00000001U)
168
169 #define SDL_TOG_FLUSH_FL_MASK (0x0000000FU)
170 #define SDL_TOG_FLUSH_FL_SHIFT (0x00000000U)
171 #define SDL_TOG_FLUSH_FL_MAX (0x0000000FU)
172
173 /* TIMEOUT */
174
175 #define SDL_TOG_TIMEOUT_TO_MASK (0x3FFFFFFFU)
176 #define SDL_TOG_TIMEOUT_TO_SHIFT (0x00000000U)
177 #define SDL_TOG_TIMEOUT_TO_MAX (0x3FFFFFFFU)
178
179 /* TIMER */
180
181 #define SDL_TOG_TIMER_EON_MASK (0xC0000000U)
182 #define SDL_TOG_TIMER_EON_SHIFT (0x0000001EU)
183 #define SDL_TOG_TIMER_EON_MAX (0x00000003U)
184
185 #define SDL_TOG_TIMER_CNTR_MASK (0x3FFFFFFFU)
186 #define SDL_TOG_TIMER_CNTR_SHIFT (0x00000000U)
187 #define SDL_TOG_TIMER_CNTR_MAX (0x3FFFFFFFU)
188
189 /* ERR_RAW */
190
191 #define SDL_TOG_ERR_RAW_CMD_MASK (0x00000004U)
192 #define SDL_TOG_ERR_RAW_CMD_SHIFT (0x00000002U)
193 #define SDL_TOG_ERR_RAW_CMD_MAX (0x00000001U)
194
195 #define SDL_TOG_ERR_RAW_UNEXP_MASK (0x00000002U)
196 #define SDL_TOG_ERR_RAW_UNEXP_SHIFT (0x00000001U)
197 #define SDL_TOG_ERR_RAW_UNEXP_MAX (0x00000001U)
198
199 #define SDL_TOG_ERR_RAW_TIMEOUT_MASK (0x00000001U)
200 #define SDL_TOG_ERR_RAW_TIMEOUT_SHIFT (0x00000000U)
201 #define SDL_TOG_ERR_RAW_TIMEOUT_MAX (0x00000001U)
202
203 /* ERR */
204
205 #define SDL_TOG_ERR_CMD_MASK (0x00000004U)
206 #define SDL_TOG_ERR_CMD_SHIFT (0x00000002U)
207 #define SDL_TOG_ERR_CMD_MAX (0x00000001U)
208
209 #define SDL_TOG_ERR_UNEXP_MASK (0x00000002U)
210 #define SDL_TOG_ERR_UNEXP_SHIFT (0x00000001U)
211 #define SDL_TOG_ERR_UNEXP_MAX (0x00000001U)
212
213 #define SDL_TOG_ERR_TIMEOUT_MASK (0x00000001U)
214 #define SDL_TOG_ERR_TIMEOUT_SHIFT (0x00000000U)
215 #define SDL_TOG_ERR_TIMEOUT_MAX (0x00000001U)
216
217 /* ERR_MSK_SET */
218
219 #define SDL_TOG_ERR_MSK_SET_CMD_MASK (0x00000004U)
220 #define SDL_TOG_ERR_MSK_SET_CMD_SHIFT (0x00000002U)
221 #define SDL_TOG_ERR_MSK_SET_CMD_MAX (0x00000001U)
222
223 #define SDL_TOG_ERR_MSK_SET_UNEXP_MASK (0x00000002U)
224 #define SDL_TOG_ERR_MSK_SET_UNEXP_SHIFT (0x00000001U)
225 #define SDL_TOG_ERR_MSK_SET_UNEXP_MAX (0x00000001U)
226
227 #define SDL_TOG_ERR_MSK_SET_TIMEOUT_MASK (0x00000001U)
228 #define SDL_TOG_ERR_MSK_SET_TIMEOUT_SHIFT (0x00000000U)
229 #define SDL_TOG_ERR_MSK_SET_TIMEOUT_MAX (0x00000001U)
230
231 /* ERR_MSK_CLR */
232
233 #define SDL_TOG_ERR_MSK_CLR_CMD_MASK (0x00000004U)
234 #define SDL_TOG_ERR_MSK_CLR_CMD_SHIFT (0x00000002U)
235 #define SDL_TOG_ERR_MSK_CLR_CMD_MAX (0x00000001U)
236
237 #define SDL_TOG_ERR_MSK_CLR_UNEXP_MASK (0x00000002U)
238 #define SDL_TOG_ERR_MSK_CLR_UNEXP_SHIFT (0x00000001U)
239 #define SDL_TOG_ERR_MSK_CLR_UNEXP_MAX (0x00000001U)
240
241 #define SDL_TOG_ERR_MSK_CLR_TIMEOUT_MASK (0x00000001U)
242 #define SDL_TOG_ERR_MSK_CLR_TIMEOUT_SHIFT (0x00000000U)
243 #define SDL_TOG_ERR_MSK_CLR_TIMEOUT_MAX (0x00000001U)
244
245 /* ERR_TM_INFO */
246
247 #define SDL_TOG_ERR_TM_INFO_CNT_MASK (0x00000003U)
248 #define SDL_TOG_ERR_TM_INFO_CNT_SHIFT (0x00000000U)
249 #define SDL_TOG_ERR_TM_INFO_CNT_MAX (0x00000003U)
250
251 /* ERR_UN_INFO */
252
253 #define SDL_TOG_ERR_UN_INFO_CNT_MASK (0x00000003U)
254 #define SDL_TOG_ERR_UN_INFO_CNT_SHIFT (0x00000000U)
255 #define SDL_TOG_ERR_UN_INFO_CNT_MAX (0x00000003U)
256
257 /* ERR_VAL */
258
259 #define SDL_TOG_ERR_VAL_RID_MASK (0x0FFF0000U)
260 #define SDL_TOG_ERR_VAL_RID_SHIFT (0x00000010U)
261 #define SDL_TOG_ERR_VAL_RID_MAX (0x00000FFFU)
262
263 #define SDL_TOG_ERR_VAL_OID_MASK (0x00000F00U)
264 #define SDL_TOG_ERR_VAL_OID_SHIFT (0x00000008U)
265 #define SDL_TOG_ERR_VAL_OID_MAX (0x0000000FU)
266
267 #define SDL_TOG_ERR_VAL_DIR_MASK (0x00000004U)
268 #define SDL_TOG_ERR_VAL_DIR_SHIFT (0x00000002U)
269 #define SDL_TOG_ERR_VAL_DIR_MAX (0x00000001U)
270
271 #define SDL_TOG_ERR_VAL_TYP_MASK (0x00000002U)
272 #define SDL_TOG_ERR_VAL_TYP_SHIFT (0x00000001U)
273 #define SDL_TOG_ERR_VAL_TYP_MAX (0x00000001U)
274
275 #define SDL_TOG_ERR_VAL_VAL_MASK (0x00000001U)
276 #define SDL_TOG_ERR_VAL_VAL_SHIFT (0x00000000U)
277 #define SDL_TOG_ERR_VAL_VAL_MAX (0x00000001U)
278
279 /* ERR_TAG */
280
281 #define SDL_TOG_ERR_TAG_TAG_MASK (0x0FFF0000U)
282 #define SDL_TOG_ERR_TAG_TAG_SHIFT (0x00000010U)
283 #define SDL_TOG_ERR_TAG_TAG_MAX (0x00000FFFU)
284
285 #define SDL_TOG_ERR_TAG_CID_MASK (0x00000FFFU)
286 #define SDL_TOG_ERR_TAG_CID_SHIFT (0x00000000U)
287 #define SDL_TOG_ERR_TAG_CID_MAX (0x00000FFFU)
288
289 /* ERR_BYT */
290
291 #define SDL_TOG_ERR_BYT_CBYTECNT_MASK (0x03FF0000U)
292 #define SDL_TOG_ERR_BYT_CBYTECNT_SHIFT (0x00000010U)
293 #define SDL_TOG_ERR_BYT_CBYTECNT_MAX (0x000003FFU)
294
295 #define SDL_TOG_ERR_BYT_OBYTECNT_MASK (0x000003FFU)
296 #define SDL_TOG_ERR_BYT_OBYTECNT_SHIFT (0x00000000U)
297 #define SDL_TOG_ERR_BYT_OBYTECNT_MAX (0x000003FFU)
298
299 /* ERR_ADDR_U */
300
301 #define SDL_TOG_ERR_ADDR_U_ADDR_MASK (0xFFFFFFFFU)
302 #define SDL_TOG_ERR_ADDR_U_ADDR_SHIFT (0x00000000U)
303 #define SDL_TOG_ERR_ADDR_U_ADDR_MAX (0xFFFFFFFFU)
304
305 /* ERR_ADDR_L */
306
307 #define SDL_TOG_ERR_ADDR_L_ADDR_MASK (0xFFFFFFFFU)
308 #define SDL_TOG_ERR_ADDR_L_ADDR_SHIFT (0x00000000U)
309 #define SDL_TOG_ERR_ADDR_L_ADDR_MAX (0xFFFFFFFFU)
310
311 #define SDL_TOG_ENABLE_KEY ((uint32_t) 0x0000000FU)
312 #define SDL_TOG_FLUSH_MODE_KEY ((uint32_t) 0x0000000FU)
313
314 #ifdef __cplusplus
315 }
316 #endif
317
318 #endif /* SDLR_TOG_H_ */
319
320 /* nothing past this point */
sdl_tog_soc.h
SDL_TOG_Regs::ERR_ADDR_L
volatile uint32_t ERR_ADDR_L
Definition: stog/v0/sdlr_tog.h:76
SDL_TOG_Regs::PID
volatile uint32_t PID
Definition: stog/v0/sdlr_tog.h:58
SDL_TOG_Regs::ENABLE
volatile uint32_t ENABLE
Definition: stog/v0/sdlr_tog.h:61
SDL_TOG_Regs::CFG
volatile uint32_t CFG
Definition: stog/v0/sdlr_tog.h:59
SDL_TOG_Regs::FLUSH
volatile uint32_t FLUSH
Definition: stog/v0/sdlr_tog.h:62
SDL_TOG_Regs::ERR_ADDR_U
volatile uint32_t ERR_ADDR_U
Definition: stog/v0/sdlr_tog.h:75
SDL_TOG_Regs::ERR_MSK_SET
volatile uint32_t ERR_MSK_SET
Definition: stog/v0/sdlr_tog.h:68
SDL_TOG_Regs::ERR_BYT
volatile uint32_t ERR_BYT
Definition: stog/v0/sdlr_tog.h:74
SDL_TOG_Regs::ERR_TM_INFO
volatile uint32_t ERR_TM_INFO
Definition: stog/v0/sdlr_tog.h:70
SDL_TOG_Regs::TIMEOUT
volatile uint32_t TIMEOUT
Definition: stog/v0/sdlr_tog.h:63
sdl_tog.h
SDL_TOG_Regs::ERR_TAG
volatile uint32_t ERR_TAG
Definition: stog/v0/sdlr_tog.h:73
sdl_ip_tog.h
Header file containing various enumerations, structure definitions and function declarations for the ...
SDL_TOG_Regs::INFO
volatile uint32_t INFO
Definition: stog/v0/sdlr_tog.h:60
SDL_TOG_Regs::ERR
volatile uint32_t ERR
Definition: stog/v0/sdlr_tog.h:67
SDL_TOG_Regs::ERR_RAW
volatile uint32_t ERR_RAW
Definition: stog/v0/sdlr_tog.h:66
SDL_TOG_Regs::ERR_VAL
volatile uint32_t ERR_VAL
Definition: stog/v0/sdlr_tog.h:72
SDL_TOG_Regs::TIMER
volatile uint32_t TIMER
Definition: stog/v0/sdlr_tog.h:64
SDL_TOG_Regs::ERR_MSK_CLR
volatile uint32_t ERR_MSK_CLR
Definition: stog/v0/sdlr_tog.h:69
SDL_TOG_Regs
Definition: stog/v0/sdlr_tog.h:57
SDL_TOG_Regs::ERR_UN_INFO
volatile uint32_t ERR_UN_INFO
Definition: stog/v0/sdlr_tog.h:71
sdlr.h
This file contains the macro definations for Register layer.