sq_common.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright (c) 2018-2022, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef SQ_COMMON_H
  7. #define SQ_COMMON_H
  8. #include <stdint.h>
  9. #include <lib/psci/psci.h>
  10. #include <lib/xlat_tables/xlat_tables_v2.h>
  11. struct draminfo {
  12. uint32_t num_regions;
  13. uint32_t reserved;
  14. uint64_t base1;
  15. uint64_t size1;
  16. uint64_t base2;
  17. uint64_t size2;
  18. uint64_t base3;
  19. uint64_t size3;
  20. };
  21. uint32_t sq_scp_get_draminfo(struct draminfo *info);
  22. void plat_sq_pwrc_setup(void);
  23. void plat_sq_interconnect_init(void);
  24. void plat_sq_interconnect_enter_coherency(void);
  25. void plat_sq_interconnect_exit_coherency(void);
  26. unsigned int sq_calc_core_pos(u_register_t mpidr);
  27. void sq_gic_driver_init(void);
  28. void sq_gic_init(void);
  29. void sq_gic_cpuif_enable(void);
  30. void sq_gic_cpuif_disable(void);
  31. void sq_gic_pcpu_init(void);
  32. int sq_io_setup(void);
  33. struct image_info *sq_get_image_info(unsigned int image_id);
  34. void sq_mmap_setup(uintptr_t total_base, size_t total_size,
  35. const struct mmap_region *mmap);
  36. /* SCMI API for power management by SCP */
  37. void sq_scmi_off(const struct psci_power_state *target_state);
  38. void sq_scmi_on(u_register_t mpidr);
  39. void __dead2 sq_scmi_sys_shutdown(void);
  40. void __dead2 sq_scmi_sys_reboot(void);
  41. void __dead2 sq_scmi_system_off(int state);
  42. /* SCMI API for vendor specific protocol */
  43. uint32_t sq_scmi_get_draminfo(struct draminfo *info);
  44. #endif /* SQ_COMMON_H */