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