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