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