plat_cci.c 888 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (C) 2021 Marek Behun <marek.behun@nic.cz>
  3. *
  4. * Based on plat/marvell/armada/common/marvell_cci.c
  5. *
  6. * SPDX-License-Identifier: BSD-3-Clause
  7. * https://spdx.org/licenses
  8. */
  9. #include <drivers/arm/cci.h>
  10. #include <lib/mmio.h>
  11. #include <plat_marvell.h>
  12. static const int cci_map[] = {
  13. PLAT_MARVELL_CCI_CLUSTER0_SL_IFACE_IX,
  14. PLAT_MARVELL_CCI_CLUSTER1_SL_IFACE_IX
  15. };
  16. /*
  17. * This redefines the weak definition in
  18. * plat/marvell/armada/common/marvell_cci.c
  19. */
  20. void plat_marvell_interconnect_init(void)
  21. {
  22. /*
  23. * To better utilize the address space, we remap CCI base address from
  24. * the default (0xD8000000) to MVEBU_CCI_BASE.
  25. * This has to be done here, rather than in cpu_wins_init(), because
  26. * cpu_wins_init() is called later.
  27. */
  28. mmio_write_32(CPU_DEC_CCI_BASE_REG, MVEBU_CCI_BASE >> 20);
  29. cci_init(PLAT_MARVELL_CCI_BASE, cci_map, ARRAY_SIZE(cci_map));
  30. }