xref: /openbmc/linux/arch/arm/include/asm/arm-cci.h (revision caab277b)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * arch/arm/include/asm/arm-cci.h
4  *
5  * Copyright (C) 2015 ARM Ltd.
6  */
7 
8 #ifndef __ASM_ARM_CCI_H
9 #define __ASM_ARM_CCI_H
10 
11 #ifdef CONFIG_MCPM
12 #include <asm/mcpm.h>
13 
14 /*
15  * We don't have a reliable way of detecting whether,
16  * if we have access to secure-only registers, unless
17  * mcpm is registered.
18  */
platform_has_secure_cci_access(void)19 static inline bool platform_has_secure_cci_access(void)
20 {
21 	return mcpm_is_available();
22 }
23 
24 #else
platform_has_secure_cci_access(void)25 static inline bool platform_has_secure_cci_access(void)
26 {
27 	return false;
28 }
29 #endif
30 
31 #endif
32