RTEMS 6.1-rc6
Loading...
Searching...
No Matches
reg_pom.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 POM.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_POM
50#define LIBBSP_ARM_TMS570_POM
51
52#include <bsp/utility.h>
53
54typedef struct{
55 uint32_t PROGSTART; /*POM Program Region Start Address Register*/
56 uint32_t OVLSTART; /*POM Overlay Region Start Address Register*/
57 uint32_t REGSIZE; /*POM Region Size Register */
58 uint32_t Reser; /*Reserved*/
60
61typedef struct{
62 uint32_t GLBCTRL; /*POM Global Control Register*/
63 uint32_t REV; /*POM Revision ID*/
64 uint32_t CLKCTRL; /*POM Clock Gate Control Register*/
65 uint32_t FLG; /*POM Status Register*/
66 uint8_t reserved1 [496];
67 tms570_pom_region_t REG[32];/*Program Regions*/
68 uint8_t reserved2 [2816];
69 uint32_t ITCTRL; /*POM Integration Control Register*/
70 uint8_t reserved3 [156];
71 uint32_t CLAIMSET; /*POM Claim Set Register*/
72 uint32_t CLAIMCLR; /*POM Claim Clear Register*/
73 uint8_t reserved4 [8];
74 uint32_t LOCKACCESS; /*POM Lock Access Register*/
75 uint32_t LOCKSTATUS; /*POM Lock Status Register*/
76 uint32_t AUTHSTATUS; /*POM Authentication Status Register*/
77 uint8_t reserved5 [12];
78 uint32_t DEVID; /*POM Device ID Register*/
79 uint32_t DEVTYPE; /*POM Device Type Register*/
80 uint32_t PERIPHERALID4; /*POM Peripheral ID 4 Register*/
81 uint32_t PERIPHERALID5; /*POM Peripheral ID 5 Register*/
82 uint32_t PERIPHERALID6; /*POM Peripheral ID 6 Register*/
83 uint32_t PERIPHERALID7; /*POM Peripheral ID 7 Register*/
84 uint32_t PERIPHERALID0; /*POM Peripheral ID 0 Register*/
85 uint32_t PERIPHERALID1; /*POM Peripheral ID 1 Register*/
86 uint32_t PERIPHERALID2; /*POM Peripheral ID 2 Register*/
87 uint32_t PERIPHERALID3; /*POM Peripheral ID 3 Register*/
88 uint32_t COMPONENTID0; /*POM Component ID 0 Register*/
89 uint32_t COMPONENTID1; /*POM Component ID 1 Register*/
90 uint32_t COMPONENTID2; /*POM Component ID 2 Register*/
91 uint32_t COMPONENTID3; /*POM Component ID 3 Register*/
93
94
95/*--------------------TMS570_POM_PROGSTART--------------------*/
96/* field: STARTADDRESS - Defines the start address of the program memory region. */
97#define TMS570_POM_PROGSTART_STARTADDRESS(val) BSP_FLD32(val,0, 22)
98#define TMS570_POM_PROGSTART_STARTADDRESS_GET(reg) BSP_FLD32GET(reg,0, 22)
99#define TMS570_POM_PROGSTART_STARTADDRESS_SET(reg,val) BSP_FLD32SET(reg, val,0, 22)
100
101
102/*--------------------TMS570_POM_OVLSTART--------------------*/
103/* field: STARTADDRESS - Defines the start address of the overlay memory region. */
104#define TMS570_POM_OVLSTART_STARTADDRESS(val) BSP_FLD32(val,0, 22)
105#define TMS570_POM_OVLSTART_STARTADDRESS_GET(reg) BSP_FLD32GET(reg,0, 22)
106#define TMS570_POM_OVLSTART_STARTADDRESS_SET(reg,val) BSP_FLD32SET(reg, val,0, 22)
107
108
109/*---------------------TMS570_POM_REGSIZE---------------------*/
110/* field: SIZE - Region size */
111#define TMS570_POM_REGSIZE_SIZE(val) BSP_FLD32(val,0, 3)
112#define TMS570_POM_REGSIZE_SIZE_GET(reg) BSP_FLD32GET(reg,0, 3)
113#define TMS570_POM_REGSIZE_SIZE_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
114
115
116/*---------------------TMS570_POM_GLBCTRL---------------------*/
117/* field: OTADDR - Overlay target Address. */
118#define TMS570_POM_GLBCTRL_OTADDR(val) BSP_FLD32(val,23, 31)
119#define TMS570_POM_GLBCTRL_OTADDR_GET(reg) BSP_FLD32GET(reg,23, 31)
120#define TMS570_POM_GLBCTRL_OTADDR_SET(reg,val) BSP_FLD32SET(reg, val,23, 31)
121
122/* field: ETO - Enable Timeout. Refer to Section 18.2.2 for more details on the timeout error. */
123#define TMS570_POM_GLBCTRL_ETO(val) BSP_FLD32(val,8, 11)
124#define TMS570_POM_GLBCTRL_ETO_GET(reg) BSP_FLD32GET(reg,8, 11)
125#define TMS570_POM_GLBCTRL_ETO_SET(reg,val) BSP_FLD32SET(reg, val,8, 11)
126
127/* field: ON_OFF - Turn functionality of POM on or off. */
128#define TMS570_POM_GLBCTRL_ON_OFF(val) BSP_FLD32(val,0, 3)
129#define TMS570_POM_GLBCTRL_ON_OFF_GET(reg) BSP_FLD32GET(reg,0, 3)
130#define TMS570_POM_GLBCTRL_ON_OFF_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
131
132
133/*-----------------------TMS570_POM_REV-----------------------*/
134/* field: SCHEME - Used to distinguish between different ID schemes. */
135#define TMS570_POM_REV_SCHEME(val) BSP_FLD32(val,30, 31)
136#define TMS570_POM_REV_SCHEME_GET(reg) BSP_FLD32GET(reg,30, 31)
137#define TMS570_POM_REV_SCHEME_SET(reg,val) BSP_FLD32SET(reg, val,30, 31)
138
139/* field: FUNC - Indicates the SW compatible module family */
140#define TMS570_POM_REV_FUNC(val) BSP_FLD32(val,16, 27)
141#define TMS570_POM_REV_FUNC_GET(reg) BSP_FLD32GET(reg,16, 27)
142#define TMS570_POM_REV_FUNC_SET(reg,val) BSP_FLD32SET(reg, val,16, 27)
143
144/* field: RTL - RTL version number */
145#define TMS570_POM_REV_RTL(val) BSP_FLD32(val,11, 15)
146#define TMS570_POM_REV_RTL_GET(reg) BSP_FLD32GET(reg,11, 15)
147#define TMS570_POM_REV_RTL_SET(reg,val) BSP_FLD32SET(reg, val,11, 15)
148
149/* field: MAJOR - Major revision number */
150#define TMS570_POM_REV_MAJOR(val) BSP_FLD32(val,8, 10)
151#define TMS570_POM_REV_MAJOR_GET(reg) BSP_FLD32GET(reg,8, 10)
152#define TMS570_POM_REV_MAJOR_SET(reg,val) BSP_FLD32SET(reg, val,8, 10)
153
154/* field: CUSTOM - Indicates a device specific implementation */
155#define TMS570_POM_REV_CUSTOM(val) BSP_FLD32(val,6, 7)
156#define TMS570_POM_REV_CUSTOM_GET(reg) BSP_FLD32GET(reg,6, 7)
157#define TMS570_POM_REV_CUSTOM_SET(reg,val) BSP_FLD32SET(reg, val,6, 7)
158
159/* field: 5_0 - MINOR 8h Minor revision number */
160#define TMS570_POM_REV_5_0(val) BSP_FLD32(val,0, 5)
161#define TMS570_POM_REV_5_0_GET(reg) BSP_FLD32GET(reg,0, 5)
162#define TMS570_POM_REV_5_0_SET(reg,val) BSP_FLD32SET(reg, val,0, 5)
163
164
165/*---------------------TMS570_POM_CLKCTRL---------------------*/
166/* field: CLK_GATE_OFF - Do not modify this bit. Leave it in its reset state. */
167#define TMS570_POM_CLKCTRL_CLK_GATE_OFF BSP_BIT32(0)
168
169
170/*-----------------------TMS570_POM_FLG-----------------------*/
171/* field: TO - Timeout. */
172#define TMS570_POM_FLG_TO BSP_BIT32(0)
173
174
175/*---------------------TMS570_POM_ITCTRL---------------------*/
176/* field: Reserved - Read returns 0. Writes have no effect. */
177/* Whole 32 bits */
178
179/*--------------------TMS570_POM_CLAIMSET--------------------*/
180/* field: SET1 - The module is claimed */
181#define TMS570_POM_CLAIMSET_SET1 BSP_BIT32(1)
182
183/* field: SET0 - The module is claimed */
184#define TMS570_POM_CLAIMSET_SET0 BSP_BIT32(0)
185
186
187/*--------------------TMS570_POM_CLAIMCLR--------------------*/
188/* field: CLR1 - The module is claimed */
189#define TMS570_POM_CLAIMCLR_CLR1 BSP_BIT32(1)
190
191/* field: CLR0 - The module is claimed */
192#define TMS570_POM_CLAIMCLR_CLR0 BSP_BIT32(0)
193
194
195/*-------------------TMS570_POM_LOCKACCESS-------------------*/
196/* field: Reserved - Read returns 0. Writes have no effect. */
197/* Whole 32 bits */
198
199/*-------------------TMS570_POM_LOCKSTATUS-------------------*/
200/* field: Reserved - Read returns 0. Writes have no effect. */
201/* Whole 32 bits */
202
203/*-------------------TMS570_POM_AUTHSTATUS-------------------*/
204/* field: Reserved - Read returns 0. Writes have no effect. */
205/* Whole 32 bits */
206
207/*----------------------TMS570_POM_DEVID----------------------*/
208/* field: Reserved - Read returns 0. Writes have no effect. */
209/* Whole 32 bits */
210
211/*---------------------TMS570_POM_DEVTYPE---------------------*/
212/* field: Sub_Type - Other */
213#define TMS570_POM_DEVTYPE_Sub_Type(val) BSP_FLD32(val,4, 7)
214#define TMS570_POM_DEVTYPE_Sub_Type_GET(reg) BSP_FLD32GET(reg,4, 7)
215#define TMS570_POM_DEVTYPE_Sub_Type_SET(reg,val) BSP_FLD32SET(reg, val,4, 7)
216
217/* field: Major_Type - Debug Control */
218#define TMS570_POM_DEVTYPE_Major_Type(val) BSP_FLD32(val,0, 3)
219#define TMS570_POM_DEVTYPE_Major_Type_GET(reg) BSP_FLD32GET(reg,0, 3)
220#define TMS570_POM_DEVTYPE_Major_Type_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
221
222
223/*------------------TMS570_POM_PERIPHERALID4------------------*/
224/* field: 4KB_Count - Only 4KB implemented */
225#define TMS570_POM_PERIPHERALID4_4KB_Count(val) BSP_FLD32(val,4, 7)
226#define TMS570_POM_PERIPHERALID4_4KB_Count_GET(reg) BSP_FLD32GET(reg,4, 7)
227#define TMS570_POM_PERIPHERALID4_4KB_Count_SET(reg,val) BSP_FLD32SET(reg, val,4, 7)
228
229/* field: JEP_Continuation - JEP106 Code */
230#define TMS570_POM_PERIPHERALID4_JEP_Continuation(val) BSP_FLD32(val,0, 3)
231#define TMS570_POM_PERIPHERALID4_JEP_Continuation_GET(reg) BSP_FLD32GET(reg,0, 3)
232#define TMS570_POM_PERIPHERALID4_JEP_Continuation_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
233
234
235/*------------------TMS570_POM_PERIPHERALID5------------------*/
236/* field: Reserved - Read returns 0. Writes have no effect. */
237/* Whole 32 bits */
238
239/*------------------TMS570_POM_PERIPHERALID6------------------*/
240/* field: Reserved - Read returns 0. Writes have no effect. */
241/* Whole 32 bits */
242
243/*------------------TMS570_POM_PERIPHERALID7------------------*/
244/* field: Reserved - Read returns 0. Writes have no effect. */
245/* Whole 32 bits */
246
247/*------------------TMS570_POM_PERIPHERALID0------------------*/
248/* field: Part_Number - Reads 0, since POMREV defines the module */
249#define TMS570_POM_PERIPHERALID0_Part_Number(val) BSP_FLD32(val,0, 7)
250#define TMS570_POM_PERIPHERALID0_Part_Number_GET(reg) BSP_FLD32GET(reg,0, 7)
251#define TMS570_POM_PERIPHERALID0_Part_Number_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
252
253
254/*------------------TMS570_POM_PERIPHERALID1------------------*/
255/* field: JEP106_Identity - Part of TI JEDEC number */
256#define TMS570_POM_PERIPHERALID1_JEP106_Identity(val) BSP_FLD32(val,4, 7)
257#define TMS570_POM_PERIPHERALID1_JEP106_Identity_GET(reg) BSP_FLD32GET(reg,4, 7)
258#define TMS570_POM_PERIPHERALID1_JEP106_Identity_SET(reg,val) BSP_FLD32SET(reg, val,4, 7)
259
260/* field: Part_Number - Reads 0, since POMREV defines the module */
261#define TMS570_POM_PERIPHERALID1_Part_Number(val) BSP_FLD32(val,0, 3)
262#define TMS570_POM_PERIPHERALID1_Part_Number_GET(reg) BSP_FLD32GET(reg,0, 3)
263#define TMS570_POM_PERIPHERALID1_Part_Number_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
264
265
266/*------------------TMS570_POM_PERIPHERALID2------------------*/
267/* field: Revision - Reads 0, since POMREV defines the module */
268#define TMS570_POM_PERIPHERALID2_Revision(val) BSP_FLD32(val,4, 7)
269#define TMS570_POM_PERIPHERALID2_Revision_GET(reg) BSP_FLD32GET(reg,4, 7)
270#define TMS570_POM_PERIPHERALID2_Revision_SET(reg,val) BSP_FLD32SET(reg, val,4, 7)
271
272/* field: JEDEC - Indicates JEDEC assigned value */
273#define TMS570_POM_PERIPHERALID2_JEDEC BSP_BIT32(3)
274
275/* field: JEP106_Identity - JEDEC+JEP106 Identity Code (POMPERIPHERALID2)+JEP106 Identity Code */
276#define TMS570_POM_PERIPHERALID2_JEP106_Identity(val) BSP_FLD32(val,0, 2)
277#define TMS570_POM_PERIPHERALID2_JEP106_Identity_GET(reg) BSP_FLD32GET(reg,0, 2)
278#define TMS570_POM_PERIPHERALID2_JEP106_Identity_SET(reg,val) BSP_FLD32SET(reg, val,0, 2)
279
280
281/*------------------TMS570_POM_PERIPHERALID3------------------*/
282/* field: Reserved - Read returns 0. Writes have no effect. */
283/* Whole 32 bits */
284
285/*------------------TMS570_POM_COMPONENTID0------------------*/
286/* field: Preamble - Preamble */
287#define TMS570_POM_COMPONENTID0_Preamble(val) BSP_FLD32(val,0, 7)
288#define TMS570_POM_COMPONENTID0_Preamble_GET(reg) BSP_FLD32GET(reg,0, 7)
289#define TMS570_POM_COMPONENTID0_Preamble_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
290
291
292/*------------------TMS570_POM_COMPONENTID1------------------*/
293/* field: Component_Class - CoreSight Component */
294#define TMS570_POM_COMPONENTID1_Component_Class(val) BSP_FLD32(val,4, 7)
295#define TMS570_POM_COMPONENTID1_Component_Class_GET(reg) BSP_FLD32GET(reg,4, 7)
296#define TMS570_POM_COMPONENTID1_Component_Class_SET(reg,val) BSP_FLD32SET(reg, val,4, 7)
297
298/* field: Preamble - Preamble */
299#define TMS570_POM_COMPONENTID1_Preamble(val) BSP_FLD32(val,0, 3)
300#define TMS570_POM_COMPONENTID1_Preamble_GET(reg) BSP_FLD32GET(reg,0, 3)
301#define TMS570_POM_COMPONENTID1_Preamble_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
302
303
304/*------------------TMS570_POM_COMPONENTID2------------------*/
305/* field: Preamble - Preamble */
306#define TMS570_POM_COMPONENTID2_Preamble(val) BSP_FLD32(val,0, 7)
307#define TMS570_POM_COMPONENTID2_Preamble_GET(reg) BSP_FLD32GET(reg,0, 7)
308#define TMS570_POM_COMPONENTID2_Preamble_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
309
310
311/*------------------TMS570_POM_COMPONENTID3------------------*/
312/* field: Preamble - Preamble */
313#define TMS570_POM_COMPONENTID3_Preamble(val) BSP_FLD32(val,0, 7)
314#define TMS570_POM_COMPONENTID3_Preamble_GET(reg) BSP_FLD32GET(reg,0, 7)
315#define TMS570_POM_COMPONENTID3_Preamble_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
316
317
318
319#endif /* LIBBSP_ARM_TMS570_POM */
This header file provides utility macros for BSPs.
Definition: reg_pom.h:54
Definition: reg_pom.h:61