Thomas Gleixner | caab277 | 2019-06-03 07:44:50 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Suzuki K. Poulose | 772742a | 2015-03-18 12:24:40 +0000 | [diff] [blame] | 2 | /* |
| 3 | * arch/arm/include/asm/arm-cci.h |
| 4 | * |
| 5 | * Copyright (C) 2015 ARM Ltd. |
Suzuki K. Poulose | 772742a | 2015-03-18 12:24:40 +0000 | [diff] [blame] | 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 | */ |
| 19 | static inline bool platform_has_secure_cci_access(void) |
| 20 | { |
| 21 | return mcpm_is_available(); |
| 22 | } |
| 23 | |
| 24 | #else |
| 25 | static inline bool platform_has_secure_cci_access(void) |
| 26 | { |
| 27 | return false; |
| 28 | } |
| 29 | #endif |
| 30 | |
| 31 | #endif |