blob: b09d22a035cd5d2859ff7346f083194dae167196 [file] [log] [blame]
Sumit Garg4d4df112018-06-15 14:43:35 +05301/*
2 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +00007#ifndef SQ_COMMON_H
8#define SQ_COMMON_H
Sumit Garg4d4df112018-06-15 14:43:35 +05309
Antonio Nino Diaz4b32e622018-08-16 16:52:57 +010010#include <stdint.h>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000011
Masahisa Kojimaebfd8eb2019-03-07 10:41:54 +090012#include <lib/psci/psci.h>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000013#include <lib/xlat_tables/xlat_tables_v2.h>
Sumit Garg4d4df112018-06-15 14:43:35 +053014
Ard Biesheuvel6fc122f2018-06-15 15:25:42 +053015struct 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
Masahisa Kojimaebfd8eb2019-03-07 10:41:54 +090026uint32_t sq_scp_get_draminfo(struct draminfo *info);
Ard Biesheuvel6fc122f2018-06-15 15:25:42 +053027
Sumit Gargfe717612018-06-15 15:17:10 +053028void plat_sq_pwrc_setup(void);
29
Sumit Gargbda9d3c2018-06-15 14:50:19 +053030void plat_sq_interconnect_init(void);
31void plat_sq_interconnect_enter_coherency(void);
32void plat_sq_interconnect_exit_coherency(void);
33
Sumit Garg4d4df112018-06-15 14:43:35 +053034unsigned int sq_calc_core_pos(u_register_t mpidr);
35
Sumit Gargc412c2c2018-06-15 14:58:25 +053036void sq_gic_driver_init(void);
37void sq_gic_init(void);
38void sq_gic_cpuif_enable(void);
39void sq_gic_cpuif_disable(void);
40void sq_gic_pcpu_init(void);
41
Sumit Garg470255b2018-06-15 15:10:16 +053042void sq_mmap_setup(uintptr_t total_base, size_t total_size,
43 const struct mmap_region *mmap);
44
Masahisa Kojimaebfd8eb2019-03-07 10:41:54 +090045/* SCMI API for power management by SCP */
46void sq_scmi_off(const struct psci_power_state *target_state);
47void sq_scmi_on(u_register_t mpidr);
Masahisa Kojimacc6d6702021-11-11 10:17:09 +090048void __dead2 sq_scmi_sys_shutdown(void);
Masahisa Kojimaebfd8eb2019-03-07 10:41:54 +090049void __dead2 sq_scmi_sys_reboot(void);
50void __dead2 sq_scmi_system_off(int state);
51/* SCMI API for vendor specific protocol */
52uint32_t sq_scmi_get_draminfo(struct draminfo *info);
53
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000054#endif /* SQ_COMMON_H */