source: rtems/c/src/lib/libbsp/arm/tms570/include/ti_herc/reg_pom.h @ bea49c9

4.11
Last change on this file since bea49c9 was bea49c9, checked in by Premysl Houdek <kom541000@…>, on Jul 16, 2015 at 2:26:09 PM

bsp/tms570: New/generated header files for TMS570 SoC peripherals registers.

The header files are generated by script make_header.py.
Current script's version can be found at:

https://github.com/AoLaD/rtems-tms570-utils/tree/headers/headers/python

Registers offsets and fields have been extracted from reference manual.

Signed-off-by: Premysl Houdek <kom541000@…>

  • Property mode set to 100644
File size: 15.6 KB
Line 
1/* The header file is generated by make_header.py from POM.json */
2/* Current script's version can be found at: */
3/* https://github.com/AoLaD/rtems-tms570-utils/tree/headers/headers/python */
4
5/*
6 * Copyright (c) 2014-2015, Premysl Houdek <kom541000@gmail.com>
7 *
8 * Czech Technical University in Prague
9 * Zikova 1903/4
10 * 166 36 Praha 6
11 * Czech Republic
12 *
13 * All rights reserved.
14 *
15 * Redistribution and use in source and binary forms, with or without
16 * modification, are permitted provided that the following conditions are met:
17 *
18 * 1. Redistributions of source code must retain the above copyright notice, this
19 *    list of conditions and the following disclaimer.
20 * 2. Redistributions in binary form must reproduce the above copyright notice,
21 *    this list of conditions and the following disclaimer in the documentation
22 *    and/or other materials provided with the distribution.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
25 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
28 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 *
35 * The views and conclusions contained in the software and documentation are those
36 * of the authors and should not be interpreted as representing official policies,
37 * either expressed or implied, of the FreeBSD Project.
38*/
39#ifndef LIBBSP_ARM_tms570_POM
40#define LIBBSP_ARM_tms570_POM
41
42#include <bsp/utility.h>
43
44typedef struct{
45  uint32_t PROGSTART;         /*POM Program Region Start Address Register*/
46  uint32_t OVLSTART;          /*POM Overlay Region Start Address Register*/
47  uint32_t REGSIZE;           /*POM Region Size Register */
48  uint32_t Reser;             /*Reserved*/
49} tms570_pom_region_t;
50
51typedef struct{
52  uint32_t GLBCTRL;           /*POM Global Control Register*/
53  uint32_t REV;               /*POM Revision ID*/
54  uint32_t CLKCTRL;           /*POM Clock Gate Control Register*/
55  uint32_t FLG;               /*POM Status Register*/
56  uint8_t reserved1 [496];
57  tms570_pom_region_t REG[32];/*Program Regions*/
58  uint8_t reserved2 [2816];
59  uint32_t ITCTRL;            /*POM Integration Control Register*/
60  uint8_t reserved3 [156];
61  uint32_t CLAIMSET;          /*POM Claim Set Register*/
62  uint32_t CLAIMCLR;          /*POM Claim Clear Register*/
63  uint8_t reserved4 [8];
64  uint32_t LOCKACCESS;        /*POM Lock Access Register*/
65  uint32_t LOCKSTATUS;        /*POM Lock Status Register*/
66  uint32_t AUTHSTATUS;        /*POM Authentication Status Register*/
67  uint8_t reserved5 [12];
68  uint32_t DEVID;             /*POM Device ID Register*/
69  uint32_t DEVTYPE;           /*POM Device Type Register*/
70  uint32_t PERIPHERALID4;     /*POM Peripheral ID 4 Register*/
71  uint32_t PERIPHERALID5;     /*POM Peripheral ID 5 Register*/
72  uint32_t PERIPHERALID6;     /*POM Peripheral ID 6 Register*/
73  uint32_t PERIPHERALID7;     /*POM Peripheral ID 7 Register*/
74  uint32_t PERIPHERALID0;     /*POM Peripheral ID 0 Register*/
75  uint32_t PERIPHERALID1;     /*POM Peripheral ID 1 Register*/
76  uint32_t PERIPHERALID2;     /*POM Peripheral ID 2 Register*/
77  uint32_t PERIPHERALID3;     /*POM Peripheral ID 3 Register*/
78  uint32_t COMPONENTID0;      /*POM Component ID 0 Register*/
79  uint32_t COMPONENTID1;      /*POM Component ID 1 Register*/
80  uint32_t COMPONENTID2;      /*POM Component ID 2 Register*/
81  uint32_t COMPONENTID3;      /*POM Component ID 3 Register*/
82} tms570_pom_t;
83
84
85/*--------------------TMS570_POMPROGSTART--------------------*/
86/* field: STARTADDRESS - Defines the start address of the program memory region. */
87#define TMS570_POM_PROGSTART_STARTADDRESS(val) BSP_FLD32(val,0, 22)
88#define TMS570_POM_PROGSTART_STARTADDRESS_GET(reg) BSP_FLD32GET(reg,0, 22)
89#define TMS570_POM_PROGSTART_STARTADDRESS_SET(reg,val) BSP_FLD32SET(reg, val,0, 22)
90
91
92/*---------------------TMS570_POMOVLSTART---------------------*/
93/* field: STARTADDRESS - Defines the start address of the overlay memory region. */
94#define TMS570_POM_OVLSTART_STARTADDRESS(val) BSP_FLD32(val,0, 22)
95#define TMS570_POM_OVLSTART_STARTADDRESS_GET(reg) BSP_FLD32GET(reg,0, 22)
96#define TMS570_POM_OVLSTART_STARTADDRESS_SET(reg,val) BSP_FLD32SET(reg, val,0, 22)
97
98
99/*---------------------TMS570_POMREGSIZE---------------------*/
100/* field: SIZE - Region size */
101#define TMS570_POM_REGSIZE_SIZE(val) BSP_FLD32(val,0, 3)
102#define TMS570_POM_REGSIZE_SIZE_GET(reg) BSP_FLD32GET(reg,0, 3)
103#define TMS570_POM_REGSIZE_SIZE_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
104
105
106/*---------------------TMS570_POMGLBCTRL---------------------*/
107/* field: OTADDR - Overlay target Address. */
108#define TMS570_POM_GLBCTRL_OTADDR(val) BSP_FLD32(val,23, 31)
109#define TMS570_POM_GLBCTRL_OTADDR_GET(reg) BSP_FLD32GET(reg,23, 31)
110#define TMS570_POM_GLBCTRL_OTADDR_SET(reg,val) BSP_FLD32SET(reg, val,23, 31)
111
112/* field: ETO - Enable Timeout. Refer to Section 18.2.2 for more details on the timeout error. */
113#define TMS570_POM_GLBCTRL_ETO(val) BSP_FLD32(val,8, 11)
114#define TMS570_POM_GLBCTRL_ETO_GET(reg) BSP_FLD32GET(reg,8, 11)
115#define TMS570_POM_GLBCTRL_ETO_SET(reg,val) BSP_FLD32SET(reg, val,8, 11)
116
117/* field: ON_OFF - Turn functionality of POM on or off. */
118#define TMS570_POM_GLBCTRL_ON_OFF(val) BSP_FLD32(val,0, 3)
119#define TMS570_POM_GLBCTRL_ON_OFF_GET(reg) BSP_FLD32GET(reg,0, 3)
120#define TMS570_POM_GLBCTRL_ON_OFF_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
121
122
123/*-----------------------TMS570_POMREV-----------------------*/
124/* field: SCHEME - Used to distinguish between different ID schemes. */
125#define TMS570_POM_REV_SCHEME(val) BSP_FLD32(val,30, 31)
126#define TMS570_POM_REV_SCHEME_GET(reg) BSP_FLD32GET(reg,30, 31)
127#define TMS570_POM_REV_SCHEME_SET(reg,val) BSP_FLD32SET(reg, val,30, 31)
128
129/* field: FUNC - Indicates the SW compatible module family */
130#define TMS570_POM_REV_FUNC(val) BSP_FLD32(val,16, 27)
131#define TMS570_POM_REV_FUNC_GET(reg) BSP_FLD32GET(reg,16, 27)
132#define TMS570_POM_REV_FUNC_SET(reg,val) BSP_FLD32SET(reg, val,16, 27)
133
134/* field: RTL - RTL version number */
135#define TMS570_POM_REV_RTL(val) BSP_FLD32(val,11, 15)
136#define TMS570_POM_REV_RTL_GET(reg) BSP_FLD32GET(reg,11, 15)
137#define TMS570_POM_REV_RTL_SET(reg,val) BSP_FLD32SET(reg, val,11, 15)
138
139/* field: MAJOR - Major revision number */
140#define TMS570_POM_REV_MAJOR(val) BSP_FLD32(val,8, 10)
141#define TMS570_POM_REV_MAJOR_GET(reg) BSP_FLD32GET(reg,8, 10)
142#define TMS570_POM_REV_MAJOR_SET(reg,val) BSP_FLD32SET(reg, val,8, 10)
143
144/* field: CUSTOM - Indicates a device specific implementation */
145#define TMS570_POM_REV_CUSTOM(val) BSP_FLD32(val,6, 7)
146#define TMS570_POM_REV_CUSTOM_GET(reg) BSP_FLD32GET(reg,6, 7)
147#define TMS570_POM_REV_CUSTOM_SET(reg,val) BSP_FLD32SET(reg, val,6, 7)
148
149/* field: 5_0 - MINOR 8h Minor revision number */
150#define TMS570_POM_REV_5_0(val) BSP_FLD32(val,0, 5)
151#define TMS570_POM_REV_5_0_GET(reg) BSP_FLD32GET(reg,0, 5)
152#define TMS570_POM_REV_5_0_SET(reg,val) BSP_FLD32SET(reg, val,0, 5)
153
154
155/*---------------------TMS570_POMCLKCTRL---------------------*/
156/* field: CLK_GATE_OFF - Do not modify this bit. Leave it in its reset state. */
157#define TMS570_POM_CLKCTRL_CLK_GATE_OFF BSP_FLD32(0)
158
159
160/*-----------------------TMS570_POMFLG-----------------------*/
161/* field: TO - Timeout. */
162#define TMS570_POM_FLG_TO BSP_FLD32(0)
163
164
165/*----------------------TMS570_POMITCTRL----------------------*/
166/* field: Reserved - Read returns 0. Writes have no effect. */
167#define TMS570_POM_ITCTRL_Reserved(val) BSP_FLD32(val,0, 31)
168#define TMS570_POM_ITCTRL_Reserved_GET(reg) BSP_FLD32GET(reg,0, 31)
169#define TMS570_POM_ITCTRL_Reserved_SET(reg,val) BSP_FLD32SET(reg, val,0, 31)
170
171
172/*---------------------TMS570_POMCLAIMSET---------------------*/
173/* field: SET1 - The module is claimed */
174#define TMS570_POM_CLAIMSET_SET1 BSP_FLD32(1)
175
176/* field: SET0 - The module is claimed */
177#define TMS570_POM_CLAIMSET_SET0 BSP_FLD32(0)
178
179
180/*---------------------TMS570_POMCLAIMCLR---------------------*/
181/* field: CLR1 - The module is claimed */
182#define TMS570_POM_CLAIMCLR_CLR1 BSP_FLD32(1)
183
184/* field: CLR0 - The module is claimed */
185#define TMS570_POM_CLAIMCLR_CLR0 BSP_FLD32(0)
186
187
188/*--------------------TMS570_POMLOCKACCESS--------------------*/
189/* field: Reserved - Read returns 0. Writes have no effect. */
190#define TMS570_POM_LOCKACCESS_Reserved(val) BSP_FLD32(val,0, 31)
191#define TMS570_POM_LOCKACCESS_Reserved_GET(reg) BSP_FLD32GET(reg,0, 31)
192#define TMS570_POM_LOCKACCESS_Reserved_SET(reg,val) BSP_FLD32SET(reg, val,0, 31)
193
194
195/*--------------------TMS570_POMLOCKSTATUS--------------------*/
196/* field: Reserved - Read returns 0. Writes have no effect. */
197#define TMS570_POM_LOCKSTATUS_Reserved(val) BSP_FLD32(val,0, 31)
198#define TMS570_POM_LOCKSTATUS_Reserved_GET(reg) BSP_FLD32GET(reg,0, 31)
199#define TMS570_POM_LOCKSTATUS_Reserved_SET(reg,val) BSP_FLD32SET(reg, val,0, 31)
200
201
202/*--------------------TMS570_POMAUTHSTATUS--------------------*/
203/* field: Reserved - Read returns 0. Writes have no effect. */
204#define TMS570_POM_AUTHSTATUS_Reserved(val) BSP_FLD32(val,0, 31)
205#define TMS570_POM_AUTHSTATUS_Reserved_GET(reg) BSP_FLD32GET(reg,0, 31)
206#define TMS570_POM_AUTHSTATUS_Reserved_SET(reg,val) BSP_FLD32SET(reg, val,0, 31)
207
208
209/*----------------------TMS570_POMDEVID----------------------*/
210/* field: Reserved - Read returns 0. Writes have no effect. */
211#define TMS570_POM_DEVID_Reserved(val) BSP_FLD32(val,0, 31)
212#define TMS570_POM_DEVID_Reserved_GET(reg) BSP_FLD32GET(reg,0, 31)
213#define TMS570_POM_DEVID_Reserved_SET(reg,val) BSP_FLD32SET(reg, val,0, 31)
214
215
216/*---------------------TMS570_POMDEVTYPE---------------------*/
217/* field: Sub_Type - Other */
218#define TMS570_POM_DEVTYPE_Sub_Type(val) BSP_FLD32(val,4, 7)
219#define TMS570_POM_DEVTYPE_Sub_Type_GET(reg) BSP_FLD32GET(reg,4, 7)
220#define TMS570_POM_DEVTYPE_Sub_Type_SET(reg,val) BSP_FLD32SET(reg, val,4, 7)
221
222/* field: Major_Type - Debug Control */
223#define TMS570_POM_DEVTYPE_Major_Type(val) BSP_FLD32(val,0, 3)
224#define TMS570_POM_DEVTYPE_Major_Type_GET(reg) BSP_FLD32GET(reg,0, 3)
225#define TMS570_POM_DEVTYPE_Major_Type_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
226
227
228/*------------------TMS570_POMPERIPHERALID4------------------*/
229/* field: 4KB_Count - Only 4KB implemented */
230#define TMS570_POM_PERIPHERALID4_4KB_Count(val) BSP_FLD32(val,4, 7)
231#define TMS570_POM_PERIPHERALID4_4KB_Count_GET(reg) BSP_FLD32GET(reg,4, 7)
232#define TMS570_POM_PERIPHERALID4_4KB_Count_SET(reg,val) BSP_FLD32SET(reg, val,4, 7)
233
234/* field: JEP_Continuation - JEP106 Code */
235#define TMS570_POM_PERIPHERALID4_JEP_Continuation(val) BSP_FLD32(val,0, 3)
236#define TMS570_POM_PERIPHERALID4_JEP_Continuation_GET(reg) BSP_FLD32GET(reg,0, 3)
237#define TMS570_POM_PERIPHERALID4_JEP_Continuation_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
238
239
240/*------------------TMS570_POMPERIPHERALID5------------------*/
241/* field: Reserved - Read returns 0. Writes have no effect. */
242#define TMS570_POM_PERIPHERALID5_Reserved(val) BSP_FLD32(val,0, 31)
243#define TMS570_POM_PERIPHERALID5_Reserved_GET(reg) BSP_FLD32GET(reg,0, 31)
244#define TMS570_POM_PERIPHERALID5_Reserved_SET(reg,val) BSP_FLD32SET(reg, val,0, 31)
245
246
247/*------------------TMS570_POMPERIPHERALID6------------------*/
248/* field: Reserved - Read returns 0. Writes have no effect. */
249#define TMS570_POM_PERIPHERALID6_Reserved(val) BSP_FLD32(val,0, 31)
250#define TMS570_POM_PERIPHERALID6_Reserved_GET(reg) BSP_FLD32GET(reg,0, 31)
251#define TMS570_POM_PERIPHERALID6_Reserved_SET(reg,val) BSP_FLD32SET(reg, val,0, 31)
252
253
254/*------------------TMS570_POMPERIPHERALID7------------------*/
255/* field: Reserved - Read returns 0. Writes have no effect. */
256#define TMS570_POM_PERIPHERALID7_Reserved(val) BSP_FLD32(val,0, 31)
257#define TMS570_POM_PERIPHERALID7_Reserved_GET(reg) BSP_FLD32GET(reg,0, 31)
258#define TMS570_POM_PERIPHERALID7_Reserved_SET(reg,val) BSP_FLD32SET(reg, val,0, 31)
259
260
261/*------------------TMS570_POMPERIPHERALID0------------------*/
262/* field: Part_Number - Reads 0, since POMREV defines the module */
263#define TMS570_POM_PERIPHERALID0_Part_Number(val) BSP_FLD32(val,0, 7)
264#define TMS570_POM_PERIPHERALID0_Part_Number_GET(reg) BSP_FLD32GET(reg,0, 7)
265#define TMS570_POM_PERIPHERALID0_Part_Number_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
266
267
268/*------------------TMS570_POMPERIPHERALID1------------------*/
269/* field: JEP106_Identity - Part of TI JEDEC number */
270#define TMS570_POM_PERIPHERALID1_JEP106_Identity(val) BSP_FLD32(val,4, 7)
271#define TMS570_POM_PERIPHERALID1_JEP106_Identity_GET(reg) BSP_FLD32GET(reg,4, 7)
272#define TMS570_POM_PERIPHERALID1_JEP106_Identity_SET(reg,val) BSP_FLD32SET(reg, val,4, 7)
273
274/* field: Part_Number - Reads 0, since POMREV defines the module */
275#define TMS570_POM_PERIPHERALID1_Part_Number(val) BSP_FLD32(val,0, 3)
276#define TMS570_POM_PERIPHERALID1_Part_Number_GET(reg) BSP_FLD32GET(reg,0, 3)
277#define TMS570_POM_PERIPHERALID1_Part_Number_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
278
279
280/*------------------TMS570_POMPERIPHERALID2------------------*/
281/* field: Revision - Reads 0, since POMREV defines the module */
282#define TMS570_POM_PERIPHERALID2_Revision(val) BSP_FLD32(val,4, 7)
283#define TMS570_POM_PERIPHERALID2_Revision_GET(reg) BSP_FLD32GET(reg,4, 7)
284#define TMS570_POM_PERIPHERALID2_Revision_SET(reg,val) BSP_FLD32SET(reg, val,4, 7)
285
286/* field: JEDEC - Indicates JEDEC assigned value */
287#define TMS570_POM_PERIPHERALID2_JEDEC BSP_FLD32(3)
288
289/* field: JEP106_Identity - JEDEC+JEP106 Identity Code (POMPERIPHERALID2)+JEP106 Identity Code */
290#define TMS570_POM_PERIPHERALID2_JEP106_Identity(val) BSP_FLD32(val,0, 2)
291#define TMS570_POM_PERIPHERALID2_JEP106_Identity_GET(reg) BSP_FLD32GET(reg,0, 2)
292#define TMS570_POM_PERIPHERALID2_JEP106_Identity_SET(reg,val) BSP_FLD32SET(reg, val,0, 2)
293
294
295/*------------------TMS570_POMPERIPHERALID3------------------*/
296/* field: Reserved - Read returns 0. Writes have no effect. */
297#define TMS570_POM_PERIPHERALID3_Reserved(val) BSP_FLD32(val,0, 31)
298#define TMS570_POM_PERIPHERALID3_Reserved_GET(reg) BSP_FLD32GET(reg,0, 31)
299#define TMS570_POM_PERIPHERALID3_Reserved_SET(reg,val) BSP_FLD32SET(reg, val,0, 31)
300
301
302/*-------------------TMS570_POMCOMPONENTID0-------------------*/
303/* field: Preamble - Preamble */
304#define TMS570_POM_COMPONENTID0_Preamble(val) BSP_FLD32(val,0, 7)
305#define TMS570_POM_COMPONENTID0_Preamble_GET(reg) BSP_FLD32GET(reg,0, 7)
306#define TMS570_POM_COMPONENTID0_Preamble_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
307
308
309/*-------------------TMS570_POMCOMPONENTID1-------------------*/
310/* field: Component_Class - CoreSight Component */
311#define TMS570_POM_COMPONENTID1_Component_Class(val) BSP_FLD32(val,4, 7)
312#define TMS570_POM_COMPONENTID1_Component_Class_GET(reg) BSP_FLD32GET(reg,4, 7)
313#define TMS570_POM_COMPONENTID1_Component_Class_SET(reg,val) BSP_FLD32SET(reg, val,4, 7)
314
315/* field: Preamble - Preamble */
316#define TMS570_POM_COMPONENTID1_Preamble(val) BSP_FLD32(val,0, 3)
317#define TMS570_POM_COMPONENTID1_Preamble_GET(reg) BSP_FLD32GET(reg,0, 3)
318#define TMS570_POM_COMPONENTID1_Preamble_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
319
320
321/*-------------------TMS570_POMCOMPONENTID2-------------------*/
322/* field: Preamble - Preamble */
323#define TMS570_POM_COMPONENTID2_Preamble(val) BSP_FLD32(val,0, 7)
324#define TMS570_POM_COMPONENTID2_Preamble_GET(reg) BSP_FLD32GET(reg,0, 7)
325#define TMS570_POM_COMPONENTID2_Preamble_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
326
327
328/*-------------------TMS570_POMCOMPONENTID3-------------------*/
329/* field: Preamble - Preamble */
330#define TMS570_POM_COMPONENTID3_Preamble(val) BSP_FLD32(val,0, 7)
331#define TMS570_POM_COMPONENTID3_Preamble_GET(reg) BSP_FLD32GET(reg,0, 7)
332#define TMS570_POM_COMPONENTID3_Preamble_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
333
334
335
336#endif /* LIBBSP_ARM_tms570_POM */
Note: See TracBrowser for help on using the repository browser.