xref: /optee_os/core/include/drivers/stm32_cpu_opp.h (revision ff3ed644be78500d7e0d726f592a93f7061233ec)
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright (c) 2022-2024, STMicroelectronics
4  */
5 
6 #ifndef DRIVERS_STM32_CPU_OPP_H
7 #define DRIVERS_STM32_CPU_OPP_H
8 
9 #include <tee_api_types.h>
10 
11 /* Get the actual number of CPU operating points */
12 unsigned int stm32_cpu_opp_count(void);
13 
14 /* Get sustained frequency level */
15 unsigned int stm32_cpu_opp_sustained_level(void);
16 
17 /* Get level value identifying CPU operating point @opp_index */
18 unsigned int stm32_cpu_opp_level(unsigned int opp);
19 
20 /* Request to switch to CPU operating point related to @level */
21 TEE_Result stm32_cpu_opp_set_level(unsigned int level);
22 
23 /* Get level (Freq KHz) related to current CPU operating point */
24 TEE_Result stm32_cpu_opp_read_level(unsigned int *level);
25 
26 #endif /*DRIVERS_STM32_CPU_OPP_H*/
27