mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-15 00:54:22 +00:00

SynQuacer SoC contains a Cortex-M3 System Control Processor(SCP) which manages system power. This commit modifies the PSCI system_off handling to call SCMI, same as other PSCI calls. System power-off is done by turing off the ATX power supply through GPIO, this operation is transferred to SCP. Note that this commit modifies only the SCMI case, obsolete SCPI implementation is not updated. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Change-Id: I6c1009e67cccd1eb5d14c338c3df9103d63709dd
54 lines
1.3 KiB
C
54 lines
1.3 KiB
C
/*
|
|
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef SQ_COMMON_H
|
|
#define SQ_COMMON_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <lib/psci/psci.h>
|
|
#include <lib/xlat_tables/xlat_tables_v2.h>
|
|
|
|
struct draminfo {
|
|
uint32_t num_regions;
|
|
uint32_t reserved;
|
|
uint64_t base1;
|
|
uint64_t size1;
|
|
uint64_t base2;
|
|
uint64_t size2;
|
|
uint64_t base3;
|
|
uint64_t size3;
|
|
};
|
|
|
|
uint32_t sq_scp_get_draminfo(struct draminfo *info);
|
|
|
|
void plat_sq_pwrc_setup(void);
|
|
|
|
void plat_sq_interconnect_init(void);
|
|
void plat_sq_interconnect_enter_coherency(void);
|
|
void plat_sq_interconnect_exit_coherency(void);
|
|
|
|
unsigned int sq_calc_core_pos(u_register_t mpidr);
|
|
|
|
void sq_gic_driver_init(void);
|
|
void sq_gic_init(void);
|
|
void sq_gic_cpuif_enable(void);
|
|
void sq_gic_cpuif_disable(void);
|
|
void sq_gic_pcpu_init(void);
|
|
|
|
void sq_mmap_setup(uintptr_t total_base, size_t total_size,
|
|
const struct mmap_region *mmap);
|
|
|
|
/* SCMI API for power management by SCP */
|
|
void sq_scmi_off(const struct psci_power_state *target_state);
|
|
void sq_scmi_on(u_register_t mpidr);
|
|
void __dead2 sq_scmi_sys_shutdown(void);
|
|
void __dead2 sq_scmi_sys_reboot(void);
|
|
void __dead2 sq_scmi_system_off(int state);
|
|
/* SCMI API for vendor specific protocol */
|
|
uint32_t sq_scmi_get_draminfo(struct draminfo *info);
|
|
|
|
#endif /* SQ_COMMON_H */
|