xref: /optee_os/core/arch/arm/plat-stm32mp1/stm32_util.h (revision 00707ccc5a0bf7f74edbd361d2aeb470047b01d8)
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /*
3  * Copyright (c) 2018, STMicroelectronics
4  */
5 
6 #ifndef __STM32_UTIL_H__
7 #define __STM32_UTIL_H__
8 
9 #include <stdint.h>
10 
11 /* Platform util for the GIC */
12 uintptr_t get_gicc_base(void);
13 uintptr_t get_gicd_base(void);
14 
15 /* Power management service */
16 #ifdef CFG_PSCI_ARM32
17 void stm32mp_register_online_cpu(void);
18 #else
19 static inline void stm32mp_register_online_cpu(void)
20 {
21 }
22 #endif
23 
24 /*
25  * Generic spinlock function that bypass spinlock if MMU is disabled or
26  * lock is NULL.
27  */
28 uint32_t may_spin_lock(unsigned int *lock);
29 void may_spin_unlock(unsigned int *lock, uint32_t exceptions);
30 
31 #endif /*__STM32_UTIL_H__*/
32