source: rtems/c/src/lib/libbsp/arm/tms570/include/ti_herc/reg_pmm.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: 12.7 KB
Line 
1/* The header file is generated by make_header.py from PMM.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_PMM
40#define LIBBSP_ARM_tms570_PMM
41
42#include <bsp/utility.h>
43
44typedef struct{
45  uint32_t LOGICPDPWRCTRL0;   /*Logic Power Domain Control Register 0*/
46  uint8_t reserved1 [12];
47  uint32_t MEMPDPWRCTRL0;     /*Memory Power Domain Control Register 0*/
48  uint8_t reserved2 [12];
49  uint32_t PDCLKDISREG;       /*Power Domain Clock Disable Register*/
50  uint32_t PDCLKDISSETREG;    /*Power Domain Clock Disable Set Register*/
51  uint32_t PDCLKDISCLRREG;    /*Power Domain Clock Disable Clear Register*/
52  uint8_t reserved3 [20];
53  uint32_t LOGICPDPWRSTAT[4]; /*Logic Power Domain PD2 Power Status Registers*/
54  uint8_t reserved4 [48];
55  uint32_t MEMPDPWRSTAT[3];   /*Memory Power Domain RAM_PD1 Power Status Registers*/
56  uint8_t reserved5 [20];
57  uint32_t GLOBALCTRL1;       /*Global Control Register 1*/
58  uint8_t reserved6 [4];
59  uint32_t GLOBALSTAT;        /*Global Status Register*/
60  uint32_t PRCKEYREG;         /*PSCON Diagnostic Compare Key Register*/
61  uint32_t LPDDCSTAT1;        /*LogicPD PSCON Diagnostic Compare Status Register 1*/
62  uint32_t LPDDCSTAT2;        /*LogicPD PSCON Diagnostic Compare Status Register 2*/
63  uint32_t MPDDCSTAT1;        /*Memory PD PSCON Diagnostic Compare Status Register 1*/
64  uint32_t MPDDCSTAT2;        /*Memory PD PSCON Diagnostic Compare Status Register 2*/
65  uint32_t ISODIAGSTAT;       /*Isolation Diagnostic Status Register*/
66} tms570_pmm_t;
67
68
69/*-----------------TMS570_PMMLOGICPDPWRCTRL0-----------------*/
70/* field: LOGICPDON0 - Read in User and Privileged Mode. Write in Privileged Mode only. */
71#define TMS570_PMM_LOGICPDPWRCTRL0_LOGICPDON0(val) BSP_FLD32(val,24, 27)
72#define TMS570_PMM_LOGICPDPWRCTRL0_LOGICPDON0_GET(reg) BSP_FLD32GET(reg,24, 27)
73#define TMS570_PMM_LOGICPDPWRCTRL0_LOGICPDON0_SET(reg,val) BSP_FLD32SET(reg, val,24, 27)
74
75/* field: LOGICPDON1 - Read in User and Privileged Mode. Write in Privileged Mode only. */
76#define TMS570_PMM_LOGICPDPWRCTRL0_LOGICPDON1(val) BSP_FLD32(val,16, 19)
77#define TMS570_PMM_LOGICPDPWRCTRL0_LOGICPDON1_GET(reg) BSP_FLD32GET(reg,16, 19)
78#define TMS570_PMM_LOGICPDPWRCTRL0_LOGICPDON1_SET(reg,val) BSP_FLD32SET(reg, val,16, 19)
79
80/* field: LOGICPDON2 - Read in User and Privileged Mode. Write in Privileged Mode only. */
81#define TMS570_PMM_LOGICPDPWRCTRL0_LOGICPDON2(val) BSP_FLD32(val,8, 11)
82#define TMS570_PMM_LOGICPDPWRCTRL0_LOGICPDON2_GET(reg) BSP_FLD32GET(reg,8, 11)
83#define TMS570_PMM_LOGICPDPWRCTRL0_LOGICPDON2_SET(reg,val) BSP_FLD32SET(reg, val,8, 11)
84
85/* field: LOGICPDON3 - Read in User and Privileged Mode. Write in Privileged Mode only. */
86#define TMS570_PMM_LOGICPDPWRCTRL0_LOGICPDON3(val) BSP_FLD32(val,0, 3)
87#define TMS570_PMM_LOGICPDPWRCTRL0_LOGICPDON3_GET(reg) BSP_FLD32GET(reg,0, 3)
88#define TMS570_PMM_LOGICPDPWRCTRL0_LOGICPDON3_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
89
90
91/*------------------TMS570_PMMMEMPDPWRCTRL0------------------*/
92/* field: MEMPDON0 - Read in User and Privileged Mode. Write in Privileged Mode only. */
93#define TMS570_PMM_MEMPDPWRCTRL0_MEMPDON0(val) BSP_FLD32(val,24, 27)
94#define TMS570_PMM_MEMPDPWRCTRL0_MEMPDON0_GET(reg) BSP_FLD32GET(reg,24, 27)
95#define TMS570_PMM_MEMPDPWRCTRL0_MEMPDON0_SET(reg,val) BSP_FLD32SET(reg, val,24, 27)
96
97/* field: MEMPDON1 - Read in User and Privileged Mode. Write in Privileged Mode only. */
98#define TMS570_PMM_MEMPDPWRCTRL0_MEMPDON1(val) BSP_FLD32(val,16, 19)
99#define TMS570_PMM_MEMPDPWRCTRL0_MEMPDON1_GET(reg) BSP_FLD32GET(reg,16, 19)
100#define TMS570_PMM_MEMPDPWRCTRL0_MEMPDON1_SET(reg,val) BSP_FLD32SET(reg, val,16, 19)
101
102/* field: MEMPDON2 - Read in User and Privileged Mode. Write in Privileged Mode only. */
103#define TMS570_PMM_MEMPDPWRCTRL0_MEMPDON2(val) BSP_FLD32(val,8, 11)
104#define TMS570_PMM_MEMPDPWRCTRL0_MEMPDON2_GET(reg) BSP_FLD32GET(reg,8, 11)
105#define TMS570_PMM_MEMPDPWRCTRL0_MEMPDON2_SET(reg,val) BSP_FLD32SET(reg, val,8, 11)
106
107
108/*-------------------TMS570_PMMPDCLKDISREG-------------------*/
109/* field: PDCLK_DIS_3 - Read in User and Privileged Mode returns the current value of PDCLK_DIS[3]. */
110#define TMS570_PMM_PDCLKDISREG_PDCLK_DIS_3 BSP_FLD32(3)
111
112/* field: PDCLK_DIS_2 - Read in User and Privileged Mode returns the current value of PDCLK_DIS[2]. */
113#define TMS570_PMM_PDCLKDISREG_PDCLK_DIS_2 BSP_FLD32(2)
114
115/* field: PDCLK_DIS_1 - ead in User and Privileged Mode returns the current value of PDCLK_DIS[1]. */
116#define TMS570_PMM_PDCLKDISREG_PDCLK_DIS_1 BSP_FLD32(1)
117
118/* field: PDCLK_DIS_0 - Read in User and Privileged Mode returns the current value of PDCLK_DIS[0]. */
119#define TMS570_PMM_PDCLKDISREG_PDCLK_DIS_0 BSP_FLD32(0)
120
121
122/*------------------TMS570_PMMPDCLKDISSETREG------------------*/
123/* field: PDCLK_DISSET_3 - Read in User and Privileged Mode returns the current value of PDCLK_DISSET[3]. */
124#define TMS570_PMM_PDCLKDISSETREG_PDCLK_DISSET_3 BSP_FLD32(3)
125
126/* field: PDCLK_DISSET_2 - Privileged Mode only. */
127#define TMS570_PMM_PDCLKDISSETREG_PDCLK_DISSET_2 BSP_FLD32(2)
128
129/* field: PDCLK_DISSET_1 - Read in User and Privileged Mode returns the current value of PDCLK_DISSET[1]. */
130#define TMS570_PMM_PDCLKDISSETREG_PDCLK_DISSET_1 BSP_FLD32(1)
131
132/* field: PDCLK_DISSET_0 - Read in User and Privileged Mode returns the current value of PDCLK_DISSET[0]. */
133#define TMS570_PMM_PDCLKDISSETREG_PDCLK_DISSET_0 BSP_FLD32(0)
134
135
136/*------------------TMS570_PMMPDCLKDISCLRREG------------------*/
137/* field: PDCLK_DISCLR_3 - PDCLK_DISCLR[3] */
138#define TMS570_PMM_PDCLKDISCLRREG_PDCLK_DISCLR_3 BSP_FLD32(3)
139
140/* field: PDCLK_DISCLR_2 - Read in User and Privileged Mode returns the current value of PDCLK_DIS[2]. */
141#define TMS570_PMM_PDCLKDISCLRREG_PDCLK_DISCLR_2 BSP_FLD32(2)
142
143/* field: PDCLK_DISCLR_1 - Read in User and Privileged Mode returns the current value of PDCLK_DIS[1]. */
144#define TMS570_PMM_PDCLKDISCLRREG_PDCLK_DISCLR_1 BSP_FLD32(1)
145
146/* field: PDCLK_DISCLR_0 - Read in User and Privileged Mode returns the current value of PDCLK_DIS[0]. */
147#define TMS570_PMM_PDCLKDISCLRREG_PDCLK_DISCLR_0 BSP_FLD32(0)
148
149
150/*------------------TMS570_PMMLOGICPDPWRSTAT------------------*/
151/* field: LOGIC_IN_TRANS0 - Logic in transition status for power domain PD2. */
152#define TMS570_PMM_LOGICPDPWRSTAT_LOGIC_IN_TRANS0 BSP_FLD32(24)
153
154/* field: MEM_IN_TRANS0 - Memory in transition status for power domain PD2. */
155#define TMS570_PMM_LOGICPDPWRSTAT_MEM_IN_TRANS0 BSP_FLD32(16)
156
157/* field: DOMAIN_ON0 - Current state of power domain PD2. */
158#define TMS570_PMM_LOGICPDPWRSTAT_DOMAIN_ON0 BSP_FLD32(8)
159
160/* field: LOGICPDPWR_STAT0 - Logic power domain PD2 power state. */
161#define TMS570_PMM_LOGICPDPWRSTAT_LOGICPDPWR_STAT0(val) BSP_FLD32(val,0, 1)
162#define TMS570_PMM_LOGICPDPWRSTAT_LOGICPDPWR_STAT0_GET(reg) BSP_FLD32GET(reg,0, 1)
163#define TMS570_PMM_LOGICPDPWRSTAT_LOGICPDPWR_STAT0_SET(reg,val) BSP_FLD32SET(reg, val,0, 1)
164
165
166/*-------------------TMS570_PMMMEMPDPWRSTAT-------------------*/
167/* field: LOGIC_IN_TRANS0 - Logic in transition status for power domain RAM_PD1. */
168#define TMS570_PMM_MEMPDPWRSTAT_LOGIC_IN_TRANS0 BSP_FLD32(24)
169
170/* field: MEM_IN_TRANS0 - Memory in transition status for power domain RAM_PD1. */
171#define TMS570_PMM_MEMPDPWRSTAT_MEM_IN_TRANS0 BSP_FLD32(16)
172
173/* field: DOMAIN_ON0 - Current state of power domain RAM_PD1. */
174#define TMS570_PMM_MEMPDPWRSTAT_DOMAIN_ON0 BSP_FLD32(8)
175
176/* field: MEMPDPWR_STAT0 - Memory power domain RAM_PD1 power state. */
177#define TMS570_PMM_MEMPDPWRSTAT_MEMPDPWR_STAT0(val) BSP_FLD32(val,0, 1)
178#define TMS570_PMM_MEMPDPWRSTAT_MEMPDPWR_STAT0_GET(reg) BSP_FLD32GET(reg,0, 1)
179#define TMS570_PMM_MEMPDPWRSTAT_MEMPDPWR_STAT0_SET(reg,val) BSP_FLD32SET(reg, val,0, 1)
180
181
182/*-------------------TMS570_PMMGLOBALCTRL1-------------------*/
183/* field: PMCTRL_PWRDN - PMC/PSCON Power Down */
184#define TMS570_PMM_GLOBALCTRL1_PMCTRL_PWRDN BSP_FLD32(8)
185
186/* field: AUTO_CLK_WAKE_ENA - Automatic Clock Enable on Wake Up */
187#define TMS570_PMM_GLOBALCTRL1_AUTO_CLK_WAKE_ENA BSP_FLD32(0)
188
189
190/*--------------------TMS570_PMMGLOBALSTAT--------------------*/
191/* field: PMCTRL_IDLE - State of PMC and all PSCONs. */
192#define TMS570_PMM_GLOBALSTAT_PMCTRL_IDLE BSP_FLD32(0)
193
194
195/*--------------------TMS570_PMMPRCKEYREG--------------------*/
196/* field: MKEY - Diagnostic PSCON Mode Key. The mode key is applied to all individual PSCON compare units. */
197#define TMS570_PMM_PRCKEYREG_MKEY(val) BSP_FLD32(val,0, 3)
198#define TMS570_PMM_PRCKEYREG_MKEY_GET(reg) BSP_FLD32GET(reg,0, 3)
199#define TMS570_PMM_PRCKEYREG_MKEY_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
200
201
202/*--------------------TMS570_PMMLPDDCSTAT1--------------------*/
203/* field: LCMPE - Logic Power Domain Compare Error */
204#define TMS570_PMM_LPDDCSTAT1_LCMPE(val) BSP_FLD32(val,16, 19)
205#define TMS570_PMM_LPDDCSTAT1_LCMPE_GET(reg) BSP_FLD32GET(reg,16, 19)
206#define TMS570_PMM_LPDDCSTAT1_LCMPE_SET(reg,val) BSP_FLD32SET(reg, val,16, 19)
207
208/* field: LSTC - Logic Power Domain Self-test Complete */
209#define TMS570_PMM_LPDDCSTAT1_LSTC(val) BSP_FLD32(val,0, 3)
210#define TMS570_PMM_LPDDCSTAT1_LSTC_GET(reg) BSP_FLD32GET(reg,0, 3)
211#define TMS570_PMM_LPDDCSTAT1_LSTC_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
212
213
214/*--------------------TMS570_PMMLPDDCSTAT2--------------------*/
215/* field: LSTET - Logic Power Domain Self-test Error Type */
216#define TMS570_PMM_LPDDCSTAT2_LSTET(val) BSP_FLD32(val,16, 19)
217#define TMS570_PMM_LPDDCSTAT2_LSTET_GET(reg) BSP_FLD32GET(reg,16, 19)
218#define TMS570_PMM_LPDDCSTAT2_LSTET_SET(reg,val) BSP_FLD32SET(reg, val,16, 19)
219
220/* field: LSTE - Logic Power Domain Self-test Error */
221#define TMS570_PMM_LPDDCSTAT2_LSTE(val) BSP_FLD32(val,0, 3)
222#define TMS570_PMM_LPDDCSTAT2_LSTE_GET(reg) BSP_FLD32GET(reg,0, 3)
223#define TMS570_PMM_LPDDCSTAT2_LSTE_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
224
225
226/*--------------------TMS570_PMMMPDDCSTAT1--------------------*/
227/* field: MCMPE - Memory Power Domain Compare Error */
228#define TMS570_PMM_MPDDCSTAT1_MCMPE(val) BSP_FLD32(val,16, 18)
229#define TMS570_PMM_MPDDCSTAT1_MCMPE_GET(reg) BSP_FLD32GET(reg,16, 18)
230#define TMS570_PMM_MPDDCSTAT1_MCMPE_SET(reg,val) BSP_FLD32SET(reg, val,16, 18)
231
232/* field: MSTC - Memory Power Domain Self-test Complete */
233#define TMS570_PMM_MPDDCSTAT1_MSTC(val) BSP_FLD32(val,0, 2)
234#define TMS570_PMM_MPDDCSTAT1_MSTC_GET(reg) BSP_FLD32GET(reg,0, 2)
235#define TMS570_PMM_MPDDCSTAT1_MSTC_SET(reg,val) BSP_FLD32SET(reg, val,0, 2)
236
237
238/*--------------------TMS570_PMMMPDDCSTAT2--------------------*/
239/* field: MSTET - Memory Power Domain Self-test Error Type */
240#define TMS570_PMM_MPDDCSTAT2_MSTET(val) BSP_FLD32(val,16, 18)
241#define TMS570_PMM_MPDDCSTAT2_MSTET_GET(reg) BSP_FLD32GET(reg,16, 18)
242#define TMS570_PMM_MPDDCSTAT2_MSTET_SET(reg,val) BSP_FLD32SET(reg, val,16, 18)
243
244/* field: MSTE - Memory Power Domain Self-test Error */
245#define TMS570_PMM_MPDDCSTAT2_MSTE(val) BSP_FLD32(val,0, 2)
246#define TMS570_PMM_MPDDCSTAT2_MSTE_GET(reg) BSP_FLD32GET(reg,0, 2)
247#define TMS570_PMM_MPDDCSTAT2_MSTE_SET(reg,val) BSP_FLD32SET(reg, val,0, 2)
248
249
250/*-------------------TMS570_PMMISODIAGSTAT-------------------*/
251/* field: ISO_DIAG - Isolation Diagnostic */
252#define TMS570_PMM_ISODIAGSTAT_ISO_DIAG(val) BSP_FLD32(val,0, 3)
253#define TMS570_PMM_ISODIAGSTAT_ISO_DIAG_GET(reg) BSP_FLD32GET(reg,0, 3)
254#define TMS570_PMM_ISODIAGSTAT_ISO_DIAG_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
255
256
257
258#endif /* LIBBSP_ARM_tms570_PMM */
Note: See TracBrowser for help on using the repository browser.