ls_ccn.c 954 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright 2020 NXP
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. *
  6. */
  7. #include <arch.h>
  8. #include <ccn.h>
  9. #include <plat_arm.h>
  10. /******************************************************************************
  11. * Helper function to place current master into coherency
  12. *****************************************************************************/
  13. void plat_ls_interconnect_enter_coherency(unsigned int num_clusters)
  14. {
  15. ccn_enter_snoop_dvm_domain(1ULL << MPIDR_AFFLVL1_VAL(read_mpidr_el1()));
  16. for (uint32_t index = 1U; index < num_clusters; index++) {
  17. ccn_enter_snoop_dvm_domain(1ULL << index);
  18. }
  19. }
  20. /******************************************************************************
  21. * Helper function to remove current master from coherency
  22. *****************************************************************************/
  23. void plat_ls_interconnect_exit_coherency(void)
  24. {
  25. ccn_exit_snoop_dvm_domain(1ULL << MPIDR_AFFLVL1_VAL(read_mpidr_el1()));
  26. }