xref: /optee_os/core/arch/arm/plat-stm32mp2/stm32_util.h (revision 5d5d7d0b1c038a6836be9f0b38585f5aa6a4dd01)
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /*
3  * Copyright (c) 2023, STMicroelectronics
4  */
5 
6 #ifndef __STM32_UTIL_H__
7 #define __STM32_UTIL_H__
8 
9 #include <drivers/stm32mp2_rcc_util.h>
10 #include <kernel/spinlock.h>
11 #include <stdint.h>
12 #include <types_ext.h>
13 
14 #define may_spin_lock(lock)		  cpu_spin_lock_xsave(lock)
15 #define may_spin_unlock(lock, exceptions) cpu_spin_unlock_xrestore(lock, \
16 								   exceptions)
17 
18 bool stm32mp_allow_probe_shared_device(const void *fdt, int node);
19 
20 #endif /*__STM32_UTIL_H__*/
21