RTEMS 6.1-rc6
Loading...
Searching...
No Matches
reg_htu.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
11/* The header file is generated by make_header.py from HTU.json */
12/* Current script's version can be found at: */
13/* https://github.com/AoLaD/rtems-tms570-utils/tree/headers/headers/python */
14
15/*
16 * Copyright (c) 2014-2015, Premysl Houdek <kom541000@gmail.com>
17 *
18 * Czech Technical University in Prague
19 * Zikova 1903/4
20 * 166 36 Praha 6
21 * Czech Republic
22 *
23 * All rights reserved.
24 *
25 * Redistribution and use in source and binary forms, with or without
26 * modification, are permitted provided that the following conditions are met:
27 *
28 * 1. Redistributions of source code must retain the above copyright notice, this
29 * list of conditions and the following disclaimer.
30 * 2. Redistributions in binary form must reproduce the above copyright notice,
31 * this list of conditions and the following disclaimer in the documentation
32 * and/or other materials provided with the distribution.
33 *
34 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
35 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
36 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
37 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
38 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
39 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
40 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
41 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
42 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
43 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 *
45 * The views and conclusions contained in the software and documentation are those
46 * of the authors and should not be interpreted as representing official policies,
47 * either expressed or implied, of the FreeBSD Project.
48*/
49#ifndef LIBBSP_ARM_TMS570_HTU
50#define LIBBSP_ARM_TMS570_HTU
51
52#include <bsp/utility.h>
53
54typedef struct{
55 uint32_t GC; /*Global Control Register*/
56 uint32_t CPENA; /*Control Packet Enable Register*/
57 uint32_t BUSY0; /*Control Packet Busy Register 0*/
58 uint32_t BUSY1; /*Control Packet Busy Register 1*/
59 uint32_t BUSY2; /*Control Packet Busy Register 2*/
60 uint32_t BUSY3; /*Control Packet Busy Register 3*/
61 uint32_t ACPE; /*Active Control Packet and Error Register*/
62 uint8_t reserved1 [4];
63 uint32_t RLBECTRL; /*Request Lost and Bus Error Control Register*/
64 uint32_t BFINTS; /*Buffer Full Interrupt Enable Set Register*/
65 uint32_t BFINTC; /*Buffer Full Interrupt Enable Clear Register*/
66 uint8_t reserved2 [8];
67 uint32_t INTOFF0; /*Interrupt Offset Register 0*/
68 uint32_t INTOFF1; /*Interrupt Offset Register 1*/
69 uint32_t BIM; /*Buffer Initialization Mode Register*/
70 uint32_t RLOSTFL; /*Request Lost Flag Register*/
71 uint32_t BFINTFL; /*Buffer Full Interrupt Flag Register*/
72 uint32_t BERINTFL; /*BER Interrupt Flag Register*/
73 uint32_t MP1S; /*Memory Protection 1 Start Address Register*/
74 uint32_t MP1E; /*Memory Protection 1 End Address Register*/
75 uint32_t DCTRL; /*Debug Control Register*/
76 uint32_t WPR; /*Watch Point Register*/
77 uint32_t WMR; /*Watch Mask Register*/
78 uint32_t ID; /*Module Identification Register*/
79 uint32_t PCR; /*Parity Control Register*/
80 uint32_t PAR; /*Parity Address Register*/
81 uint8_t reserved3 [4];
82 uint32_t MPCS; /*Memory Protection Control and Status Register*/
83 uint32_t MP0S; /*Memory Protection 0 Start Address Register*/
84 uint32_t MP0E; /*Memory Protection 0 End Address Register*/
86
87
88/*-----------------------TMS570_HTU_GC-----------------------*/
89/* field: VBUSHOLD - Hold the VBUS bus */
90#define TMS570_HTU_GC_VBUSHOLD BSP_BIT32(24)
91
92/* field: HTUEN - Transfer Unit Enable Bit */
93#define TMS570_HTU_GC_HTUEN BSP_BIT32(16)
94
95/* field: DEBM - Debug Mode */
96#define TMS570_HTU_GC_DEBM BSP_BIT32(8)
97
98/* field: HTURES - HTU Software Reset Request */
99#define TMS570_HTU_GC_HTURES BSP_BIT32(0)
100
101
102/*----------------------TMS570_HTU_CPENA----------------------*/
103/* field: CPENA - CP Enable Bits */
104#define TMS570_HTU_CPENA_CPENA(val) BSP_FLD32(val,0, 15)
105#define TMS570_HTU_CPENA_CPENA_GET(reg) BSP_FLD32GET(reg,0, 15)
106#define TMS570_HTU_CPENA_CPENA_SET(reg,val) BSP_FLD32SET(reg, val,0, 15)
107
108
109/*----------------------TMS570_HTU_BUSY0----------------------*/
110/* field: BUSY0A - Busy Flag for CP A of DCP 0 */
111#define TMS570_HTU_BUSY0_BUSY0A BSP_BIT32(24)
112
113/* field: BUSY0B - Busy Flag for CP B of DCP 0 */
114#define TMS570_HTU_BUSY0_BUSY0B BSP_BIT32(16)
115
116/* field: BUSY1A - Busy Flag for CP A of DCP 1 */
117#define TMS570_HTU_BUSY0_BUSY1A BSP_BIT32(8)
118
119/* field: BUSY1B - Busy Flag for CP B of DCP 1 */
120#define TMS570_HTU_BUSY0_BUSY1B BSP_BIT32(0)
121
122
123/*----------------------TMS570_HTU_BUSY1----------------------*/
124/* field: BUSY2A - Busy Flag for CP A of DCP 2 */
125#define TMS570_HTU_BUSY1_BUSY2A BSP_BIT32(24)
126
127/* field: BUSY2B - Busy Flag for CP B of DCP 2 */
128#define TMS570_HTU_BUSY1_BUSY2B BSP_BIT32(16)
129
130/* field: BUSY3A - Busy Flag for CP A of DCP 3 */
131#define TMS570_HTU_BUSY1_BUSY3A BSP_BIT32(8)
132
133/* field: BUSY3B - Busy Flag for CP B of DCP 3 */
134#define TMS570_HTU_BUSY1_BUSY3B BSP_BIT32(0)
135
136
137/*----------------------TMS570_HTU_BUSY2----------------------*/
138/* field: BUSY4A - Busy Flag for CP A of DCP 4 */
139#define TMS570_HTU_BUSY2_BUSY4A BSP_BIT32(24)
140
141/* field: BUSY4B - Busy Flag for CP B of DCP 4 */
142#define TMS570_HTU_BUSY2_BUSY4B BSP_BIT32(16)
143
144/* field: BUSY5A - Busy Flag for CP A of DCP 5 */
145#define TMS570_HTU_BUSY2_BUSY5A BSP_BIT32(8)
146
147/* field: BUSY5B - Busy Flag for CP B of DCP 5 */
148#define TMS570_HTU_BUSY2_BUSY5B BSP_BIT32(0)
149
150
151/*----------------------TMS570_HTU_BUSY3----------------------*/
152/* field: BUSY6A - Busy Flag for CP A of DCP 6 */
153#define TMS570_HTU_BUSY3_BUSY6A BSP_BIT32(24)
154
155/* field: BUSY6B - Busy Flag for CP B of DCP 6 */
156#define TMS570_HTU_BUSY3_BUSY6B BSP_BIT32(16)
157
158/* field: BUSY7A - Busy Flag for CP A of DCP 7 */
159#define TMS570_HTU_BUSY3_BUSY7A BSP_BIT32(8)
160
161/* field: BUSY7B - Busy Flag for CP B of DCP 7 */
162#define TMS570_HTU_BUSY3_BUSY7B BSP_BIT32(0)
163
164
165/*----------------------TMS570_HTU_ACPE----------------------*/
166/* field: ERRF - Error Flag */
167#define TMS570_HTU_ACPE_ERRF BSP_BIT32(31)
168
169
170/*--------------------TMS570_HTU_RLBECTRL--------------------*/
171/* field: BERINTENA - Bus Error Interrupt Enable Bit */
172#define TMS570_HTU_RLBECTRL_BERINTENA BSP_BIT32(16)
173
174/* field: CORL - Continue On Request Lost Error */
175#define TMS570_HTU_RLBECTRL_CORL BSP_BIT32(8)
176
177/* field: RLINTENA - Request Lost Interrupt Enable Bit */
178#define TMS570_HTU_RLBECTRL_RLINTENA BSP_BIT32(0)
179
180
181/*---------------------TMS570_HTU_BFINTS---------------------*/
182/* field: BFINTENA - Bus Full Interrupt Enable Bits. */
183#define TMS570_HTU_BFINTS_BFINTENA(val) BSP_FLD32(val,0, 15)
184#define TMS570_HTU_BFINTS_BFINTENA_GET(reg) BSP_FLD32GET(reg,0, 15)
185#define TMS570_HTU_BFINTS_BFINTENA_SET(reg,val) BSP_FLD32SET(reg, val,0, 15)
186
187
188/*---------------------TMS570_HTU_BFINTC---------------------*/
189/* field: BFINTDIS - */
190#define TMS570_HTU_BFINTC_BFINTDIS(val) BSP_FLD32(val,0, 15)
191#define TMS570_HTU_BFINTC_BFINTDIS_GET(reg) BSP_FLD32GET(reg,0, 15)
192#define TMS570_HTU_BFINTC_BFINTDIS_SET(reg,val) BSP_FLD32SET(reg, val,0, 15)
193
194
195/*---------------------TMS570_HTU_INTOFF0---------------------*/
196/* field: INTTYPE0 - Interrupt Type of Interrupt Line 0. */
197#define TMS570_HTU_INTOFF0_INTTYPE0(val) BSP_FLD32(val,8, 10)
198#define TMS570_HTU_INTOFF0_INTTYPE0_GET(reg) BSP_FLD32GET(reg,8, 10)
199#define TMS570_HTU_INTOFF0_INTTYPE0_SET(reg,val) BSP_FLD32SET(reg, val,8, 10)
200
201/* field: CPOFF0 - CP Offset. */
202#define TMS570_HTU_INTOFF0_CPOFF0(val) BSP_FLD32(val,0, 4)
203#define TMS570_HTU_INTOFF0_CPOFF0_GET(reg) BSP_FLD32GET(reg,0, 4)
204#define TMS570_HTU_INTOFF0_CPOFF0_SET(reg,val) BSP_FLD32SET(reg, val,0, 4)
205
206
207/*---------------------TMS570_HTU_INTOFF1---------------------*/
208/* field: INTTYPE1 - INTTYPE1 Interrupt Type of Interrupt Line 1. */
209#define TMS570_HTU_INTOFF1_INTTYPE1(val) BSP_FLD32(val,8, 10)
210#define TMS570_HTU_INTOFF1_INTTYPE1_GET(reg) BSP_FLD32GET(reg,8, 10)
211#define TMS570_HTU_INTOFF1_INTTYPE1_SET(reg,val) BSP_FLD32SET(reg, val,8, 10)
212
213/* field: CPOFF1 - CP Offset. */
214#define TMS570_HTU_INTOFF1_CPOFF1(val) BSP_FLD32(val,0, 4)
215#define TMS570_HTU_INTOFF1_CPOFF1_GET(reg) BSP_FLD32GET(reg,0, 4)
216#define TMS570_HTU_INTOFF1_CPOFF1_SET(reg,val) BSP_FLD32SET(reg, val,0, 4)
217
218
219/*-----------------------TMS570_HTU_BIM-----------------------*/
220/* field: BIM - Buffer Initialization Mode */
221#define TMS570_HTU_BIM_BIM(val) BSP_FLD32(val,0, 7)
222#define TMS570_HTU_BIM_BIM_GET(reg) BSP_FLD32GET(reg,0, 7)
223#define TMS570_HTU_BIM_BIM_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
224
225
226/*---------------------TMS570_HTU_RLOSTFL---------------------*/
227/* field: CPRLFL - CP Request Lost Flags */
228#define TMS570_HTU_RLOSTFL_CPRLFL(val) BSP_FLD32(val,0, 15)
229#define TMS570_HTU_RLOSTFL_CPRLFL_GET(reg) BSP_FLD32GET(reg,0, 15)
230#define TMS570_HTU_RLOSTFL_CPRLFL_SET(reg,val) BSP_FLD32SET(reg, val,0, 15)
231
232
233/*---------------------TMS570_HTU_BFINTFL---------------------*/
234/* field: BFINTFL - Buffer Full Interrupt Flags */
235#define TMS570_HTU_BFINTFL_BFINTFL(val) BSP_FLD32(val,0, 15)
236#define TMS570_HTU_BFINTFL_BFINTFL_GET(reg) BSP_FLD32GET(reg,0, 15)
237#define TMS570_HTU_BFINTFL_BFINTFL_SET(reg,val) BSP_FLD32SET(reg, val,0, 15)
238
239
240/*--------------------TMS570_HTU_BERINTFL--------------------*/
241/* field: BERINTFL - Bus Error Interrupt Flags */
242#define TMS570_HTU_BERINTFL_BERINTFL(val) BSP_FLD32(val,0, 15)
243#define TMS570_HTU_BERINTFL_BERINTFL_GET(reg) BSP_FLD32GET(reg,0, 15)
244#define TMS570_HTU_BERINTFL_BERINTFL_SET(reg,val) BSP_FLD32SET(reg, val,0, 15)
245
246
247/*----------------------TMS570_HTU_MP1S----------------------*/
248/* field: STARTADDRESS1 - he start address defines at which main memory address the region begins. */
249/* Whole 32 bits */
250
251/*----------------------TMS570_HTU_MP1E----------------------*/
252/* field: ENDADDRESS1 - The end address defines at which address the region ends. */
253/* Whole 32 bits */
254
255/*----------------------TMS570_HTU_DCTRL----------------------*/
256/* field: CPNUM - CP Number. These bit fields indicate the CP which should cause the watch point to match. */
257#define TMS570_HTU_DCTRL_CPNUM(val) BSP_FLD32(val,24, 27)
258#define TMS570_HTU_DCTRL_CPNUM_GET(reg) BSP_FLD32GET(reg,24, 27)
259#define TMS570_HTU_DCTRL_CPNUM_SET(reg,val) BSP_FLD32SET(reg, val,24, 27)
260
261/* field: HTUDBGS - HTU Debug Status. */
262#define TMS570_HTU_DCTRL_HTUDBGS BSP_BIT32(16)
263
264/* field: DBREN - Debug Request Enable */
265#define TMS570_HTU_DCTRL_DBREN BSP_BIT32(0)
266
267
268/*-----------------------TMS570_HTU_WPR-----------------------*/
269/* field: WP - Watch Point Register */
270/* Whole 32 bits */
271
272/*-----------------------TMS570_HTU_WMR-----------------------*/
273/* field: WM - Watch Mask Register */
274/* Whole 32 bits */
275
276/*-----------------------TMS570_HTU_ID-----------------------*/
277/* field: CLASS - Module Class */
278#define TMS570_HTU_ID_CLASS(val) BSP_FLD32(val,16, 23)
279#define TMS570_HTU_ID_CLASS_GET(reg) BSP_FLD32GET(reg,16, 23)
280#define TMS570_HTU_ID_CLASS_SET(reg,val) BSP_FLD32SET(reg, val,16, 23)
281
282/* field: TYPE - Subtype within a Class */
283#define TMS570_HTU_ID_TYPE(val) BSP_FLD32(val,8, 15)
284#define TMS570_HTU_ID_TYPE_GET(reg) BSP_FLD32GET(reg,8, 15)
285#define TMS570_HTU_ID_TYPE_SET(reg,val) BSP_FLD32SET(reg, val,8, 15)
286
287/* field: REV - Module Revision Number */
288#define TMS570_HTU_ID_REV(val) BSP_FLD32(val,0, 7)
289#define TMS570_HTU_ID_REV_GET(reg) BSP_FLD32GET(reg,0, 7)
290#define TMS570_HTU_ID_REV_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
291
292
293/*-----------------------TMS570_HTU_PCR-----------------------*/
294/* field: COPE - Continue on Parity Error */
295#define TMS570_HTU_PCR_COPE BSP_BIT32(16)
296
297/* field: TEST - Test. */
298#define TMS570_HTU_PCR_TEST BSP_BIT32(8)
299
300/* field: PARITY_ENA - Enable/Disable Parity Checking. */
301#define TMS570_HTU_PCR_PARITY_ENA(val) BSP_FLD32(val,0, 3)
302#define TMS570_HTU_PCR_PARITY_ENA_GET(reg) BSP_FLD32GET(reg,0, 3)
303#define TMS570_HTU_PCR_PARITY_ENA_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
304
305
306/*-----------------------TMS570_HTU_PAR-----------------------*/
307/* field: PEFT - Parity Error Fault Flag. */
308#define TMS570_HTU_PAR_PEFT BSP_BIT32(16)
309
310/* field: PAOFF - PAOFF */
311#define TMS570_HTU_PAR_PAOFF(val) BSP_FLD32(val,0, 8)
312#define TMS570_HTU_PAR_PAOFF_GET(reg) BSP_FLD32GET(reg,0, 8)
313#define TMS570_HTU_PAR_PAOFF_SET(reg,val) BSP_FLD32SET(reg, val,0, 8)
314
315
316/*----------------------TMS570_HTU_MPCS----------------------*/
317/* field: CPNUM0 - Control Packet Number for single memory protection region configuration. */
318#define TMS570_HTU_MPCS_CPNUM0(val) BSP_FLD32(val,24, 27)
319#define TMS570_HTU_MPCS_CPNUM0_GET(reg) BSP_FLD32GET(reg,24, 27)
320#define TMS570_HTU_MPCS_CPNUM0_SET(reg,val) BSP_FLD32SET(reg, val,24, 27)
321
322/* field: MPEFT1 - MPEFT1 */
323#define TMS570_HTU_MPCS_MPEFT1 BSP_BIT32(17)
324
325/* field: MPEFT0 - Memory Protection Error Fault Flag 0. */
326#define TMS570_HTU_MPCS_MPEFT0 BSP_BIT32(16)
327
328/* field: CPNUM1 - Control Packet Number for single memory protection region configuration. */
329#define TMS570_HTU_MPCS_CPNUM1(val) BSP_FLD32(val,8, 11)
330#define TMS570_HTU_MPCS_CPNUM1_GET(reg) BSP_FLD32GET(reg,8, 11)
331#define TMS570_HTU_MPCS_CPNUM1_SET(reg,val) BSP_FLD32SET(reg, val,8, 11)
332
333
334/*----------------------TMS570_HTU_MP0S----------------------*/
335/* field: ISTARTADDRESS0 - The start address defines at which main memory address the region begins. */
336/* Whole 32 bits */
337
338/*----------------------TMS570_HTU_MP0E----------------------*/
339/* field: ENDADDRESS0 - The end address defines at which address the region ends. */
340/* Whole 32 bits */
341
342
343#endif /* LIBBSP_ARM_TMS570_HTU */
This header file provides utility macros for BSPs.
Definition: reg_htu.h:54