arm-cci.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * arch/arm/include/asm/arm-cci.h
  3. *
  4. * Copyright (C) 2015 ARM Ltd.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef __ASM_ARM_CCI_H
  19. #define __ASM_ARM_CCI_H
  20. #ifdef CONFIG_MCPM
  21. #include <asm/mcpm.h>
  22. /*
  23. * We don't have a reliable way of detecting whether,
  24. * if we have access to secure-only registers, unless
  25. * mcpm is registered.
  26. */
  27. static inline bool platform_has_secure_cci_access(void)
  28. {
  29. return mcpm_is_available();
  30. }
  31. #else
  32. static inline bool platform_has_secure_cci_access(void)
  33. {
  34. return false;
  35. }
  36. #endif
  37. #endif