AM62x MCU+ SDK  10.00.00
safety_checkers_pm.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2024 Texas Instruments Incorporated
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  */
33 
74 #ifndef SAFETY_CHECKERS_PM_H_
75 #define SAFETY_CHECKERS_PM_H_
76 
77 /* ========================================================================== */
78 /* Include Files */
79 /* ========================================================================== */
80 
81 /* None */
82 
83 #ifdef __cplusplus
84 extern "C" {
85 #endif
86 
87 /* ========================================================================== */
88 /* Macros & Typedefs */
89 /* ========================================================================== */
90 
91 /* None */
92 
100 /* ========================================================================== */
101 /* Structure Declarations */
102 /* ========================================================================== */
103 
109 typedef struct
110 {
111  /* Base address of PLL control module registers */
112  uint32_t baseAddr;
113  /* Pointer to the register offset array for each PLL */
114  uint32_t *regOffsetArr;
115  /* Total length of each PLL registers */
116  uint32_t length;
118 
125 typedef struct
126 {
127  /* Domain base address of PSC module registers */
128  uint32_t baseAddr;
129  /* Total number of PD stat registers */
130  uint32_t pdStat;
131  /* Total number of MD stat registers */
132  uint32_t mdStat;
134 
137 /* ========================================================================== */
138 /* Internal/Private Function Declarations */
139 /* ========================================================================== */
140 
141 /* None */
142 
150 /* ========================================================================== */
151 /* Function Declarations */
152 /* ========================================================================== */
153 
167 int32_t SafetyCheckers_pmGetPscRegCfg(uintptr_t *pscRegCfg, uint32_t size);
168 
181 int32_t SafetyCheckers_pmVerifyPscRegCfg(const uintptr_t *pscRegCfg, uint32_t size);
182 
196 int32_t SafetyCheckers_pmGetPllRegCfg(uintptr_t *pllRegCfg, uint32_t size);
197 
210 int32_t SafetyCheckers_pmVerifyPllRegCfg(const uintptr_t *pllRegCfg, uint32_t size);
211 
222 
223 /* ========================================================================== */
224 /* Static Function Definitions */
225 /* ========================================================================== */
226 
227 /* None */
228 
229 #ifdef __cplusplus
230 }
231 #endif
232 
233 #endif /* #ifndef SAFETY_CHECKERS_PM_H_ */
234 
SafetyCheckers_PmPscData::baseAddr
uint32_t baseAddr
Definition: safety_checkers_pm.h:128
size
uint16_t size
Definition: tisci_boardcfg.h:1
SafetyCheckers_PmPllData::baseAddr
uint32_t baseAddr
Definition: safety_checkers_pm.h:112
SafetyCheckers_PmPscData
Structure to hold the base address and the number of Module Domain(MD) stat and Power Domain(PD) stat...
Definition: safety_checkers_pm.h:126
SafetyCheckers_PmPscData::mdStat
uint32_t mdStat
Definition: safety_checkers_pm.h:132
SafetyCheckers_pmVerifyPllRegCfg
int32_t SafetyCheckers_pmVerifyPllRegCfg(const uintptr_t *pllRegCfg, uint32_t size)
API to read back and compares the current register configuration for PLL module. E....
SafetyCheckers_PmPllData
Structure to hold the base address and the length of PLLs.
Definition: safety_checkers_pm.h:110
SafetyCheckers_pmGetPscRegCfg
int32_t SafetyCheckers_pmGetPscRegCfg(uintptr_t *pscRegCfg, uint32_t size)
API to get register configuration for PSC module. E.g. When the PSC register config is requested,...
SafetyCheckers_PmPllData::regOffsetArr
uint32_t * regOffsetArr
Definition: safety_checkers_pm.h:114
SafetyCheckers_pmRegisterLock
int32_t SafetyCheckers_pmRegisterLock(void)
API to lock the PLL control module registers. E.g. When the PLL register lock is requested,...
SafetyCheckers_pmVerifyPscRegCfg
int32_t SafetyCheckers_pmVerifyPscRegCfg(const uintptr_t *pscRegCfg, uint32_t size)
API to read back and compares the current register configuration for PSC module. E....
SafetyCheckers_PmPllData::length
uint32_t length
Definition: safety_checkers_pm.h:116
SafetyCheckers_PmPscData::pdStat
uint32_t pdStat
Definition: safety_checkers_pm.h:130
SafetyCheckers_pmGetPllRegCfg
int32_t SafetyCheckers_pmGetPllRegCfg(uintptr_t *pllRegCfg, uint32_t size)
API to get register configuration for PLL module. E.g. When the PLL register config is requested,...