mtspmc.h 981 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2021, MediaTek Inc. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef MTSPMC_H
  7. #define MTSPMC_H
  8. #include <stdint.h>
  9. int spmc_init(void);
  10. void spm_poweron_cpu(unsigned int cluster, unsigned int cpu);
  11. void spm_poweroff_cpu(unsigned int cluster, unsigned int cpu);
  12. void spm_poweroff_cluster(unsigned int cluster);
  13. void spm_poweron_cluster(unsigned int cluster);
  14. bool spm_get_cpu_powerstate(unsigned int cluster, unsigned int cpu);
  15. bool spm_get_cluster_powerstate(unsigned int cluster);
  16. bool spm_get_powerstate(uint32_t mask);
  17. void mcucfg_init_archstate(unsigned int cluster, unsigned int cpu, bool arm64);
  18. void mcucfg_set_bootaddr(unsigned int cluster, unsigned int cpu, uintptr_t bootaddr);
  19. uintptr_t mcucfg_get_bootaddr(unsigned int cluster, unsigned int cpu);
  20. void mcucfg_disable_gic_wakeup(unsigned int cluster, unsigned int cpu);
  21. void mcucfg_enable_gic_wakeup(unsigned int cluster, unsigned int cpu);
  22. #endif /* MTSPMC_H */