plat_dcm.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Copyright (c) 2019, MediaTek Inc. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef PLAT_DCM_H
  7. #define PLAT_DCM_H
  8. #define MP2_SYNC_DCM (MCUCFG_BASE + 0x2274)
  9. #define MP2_SYNC_DCM_MASK (0x1 << 0)
  10. #define MP2_SYNC_DCM_ON (0x1 << 0)
  11. #define MP2_SYNC_DCM_OFF (0x0 << 0)
  12. extern uint64_t plat_dcm_mcsi_a_addr;
  13. extern uint32_t plat_dcm_mcsi_a_val;
  14. extern int plat_dcm_initiated;
  15. extern void plat_dcm_mcsi_a_backup(void);
  16. extern void plat_dcm_mcsi_a_restore(void);
  17. extern void plat_dcm_rgu_enable(void);
  18. extern void plat_dcm_restore_cluster_on(unsigned long mpidr);
  19. extern void plat_dcm_msg_handler(uint64_t x1);
  20. extern unsigned long plat_dcm_get_enabled_cnt(uint64_t type);
  21. extern void plat_dcm_init(void);
  22. #define ALL_DCM_TYPE (ARMCORE_DCM_TYPE | MCUSYS_DCM_TYPE \
  23. | STALL_DCM_TYPE | BIG_CORE_DCM_TYPE \
  24. | GIC_SYNC_DCM_TYPE | RGU_DCM_TYPE \
  25. | INFRA_DCM_TYPE \
  26. | DDRPHY_DCM_TYPE | EMI_DCM_TYPE | DRAMC_DCM_TYPE \
  27. | MCSI_DCM_TYPE)
  28. enum {
  29. ARMCORE_DCM_TYPE = (1U << 0),
  30. MCUSYS_DCM_TYPE = (1U << 1),
  31. INFRA_DCM_TYPE = (1U << 2),
  32. PERI_DCM_TYPE = (1U << 3),
  33. EMI_DCM_TYPE = (1U << 4),
  34. DRAMC_DCM_TYPE = (1U << 5),
  35. DDRPHY_DCM_TYPE = (1U << 6),
  36. STALL_DCM_TYPE = (1U << 7),
  37. BIG_CORE_DCM_TYPE = (1U << 8),
  38. GIC_SYNC_DCM_TYPE = (1U << 9),
  39. LAST_CORE_DCM_TYPE = (1U << 10),
  40. RGU_DCM_TYPE = (1U << 11),
  41. TOPCKG_DCM_TYPE = (1U << 12),
  42. LPDMA_DCM_TYPE = (1U << 13),
  43. MCSI_DCM_TYPE = (1U << 14),
  44. NR_DCM_TYPE = 15,
  45. };
  46. #endif /* PLAT_DCM_H */