brcm_ccn.c 814 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) 2019-2020, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <arch.h>
  7. #include <arch_helpers.h>
  8. #include <drivers/arm/ccn.h>
  9. #include <platform_def.h>
  10. static const unsigned char master_to_rn_id_map[] = {
  11. PLAT_BRCM_CLUSTER_TO_CCN_ID_MAP
  12. };
  13. static const ccn_desc_t bcm_ccn_desc = {
  14. .periphbase = PLAT_BRCM_CCN_BASE,
  15. .num_masters = ARRAY_SIZE(master_to_rn_id_map),
  16. .master_to_rn_id_map = master_to_rn_id_map
  17. };
  18. void plat_brcm_interconnect_init(void)
  19. {
  20. ccn_init(&bcm_ccn_desc);
  21. }
  22. void plat_brcm_interconnect_enter_coherency(void)
  23. {
  24. ccn_enter_snoop_dvm_domain(1 << MPIDR_AFFLVL1_VAL(read_mpidr_el1()));
  25. }
  26. void plat_brcm_interconnect_exit_coherency(void)
  27. {
  28. ccn_exit_snoop_dvm_domain(1 << MPIDR_AFFLVL1_VAL(read_mpidr_el1()));
  29. }