AM62Px MCU+ SDK  09.02.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 
46 #ifndef SAFETY_CHECKERS_PM_H_
47 #define SAFETY_CHECKERS_PM_H_
48 
49 /* ========================================================================== */
50 /* Include Files */
51 /* ========================================================================== */
52 
53 /* None */
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
59 /* ========================================================================== */
60 /* Macros & Typedefs */
61 /* ========================================================================== */
62 
63 /* None */
64 
72 /* ========================================================================== */
73 /* Structure Declarations */
74 /* ========================================================================== */
75 
81 typedef struct
82 {
83  /* Base address of PLL control module registers */
84  uint32_t baseAddr;
85  /* Pointer to the register offset array for each PLL */
86  uint32_t *regOffsetArr;
87  /* Total length of each PLL registers */
88  uint32_t length;
90 
97 typedef struct
98 {
99  /* Domain base address of PSC module registers */
100  uint32_t baseAddr;
101  /* Total number of PD stat registers */
102  uint32_t pdStat;
103  /* Total number of MD stat registers */
104  uint32_t mdStat;
106 
109 /* ========================================================================== */
110 /* Internal/Private Function Declarations */
111 /* ========================================================================== */
112 
113 /* None */
114 
122 /* ========================================================================== */
123 /* Function Declarations */
124 /* ========================================================================== */
125 
139 int32_t SafetyCheckers_pmGetPscRegCfg(uintptr_t *pscRegCfg, uint32_t size);
140 
153 int32_t SafetyCheckers_pmVerifyPscRegCfg(const uintptr_t *pscRegCfg, uint32_t size);
154 
168 int32_t SafetyCheckers_pmGetPllRegCfg(uintptr_t *pllRegCfg, uint32_t size);
169 
182 int32_t SafetyCheckers_pmVerifyPllRegCfg(const uintptr_t *pllRegCfg, uint32_t size);
183 
194 
195 /* ========================================================================== */
196 /* Static Function Definitions */
197 /* ========================================================================== */
198 
199 /* None */
200 
201 #ifdef __cplusplus
202 }
203 #endif
204 
205 #endif /* #ifndef SAFETY_CHECKERS_PM_H_ */
206 
SafetyCheckers_PmPscData::baseAddr
uint32_t baseAddr
Definition: safety_checkers_pm.h:100
size
uint16_t size
Definition: tisci_boardcfg.h:1
SafetyCheckers_PmPllData::baseAddr
uint32_t baseAddr
Definition: safety_checkers_pm.h:84
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:98
SafetyCheckers_PmPscData::mdStat
uint32_t mdStat
Definition: safety_checkers_pm.h:104
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:82
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:86
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:88
SafetyCheckers_PmPscData::pdStat
uint32_t pdStat
Definition: safety_checkers_pm.h:102
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,...