Merge "refactor(plat/synquacer): update PSCI system_off handling" into integration

This commit is contained in:
Madhukar Pappireddy 2021-12-09 15:03:06 +01:00 committed by TrustedFirmware Code Review
commit 590fd53d61
3 changed files with 10 additions and 0 deletions

View File

@ -189,6 +189,11 @@ void __dead2 sq_scmi_system_off(int state)
/*
* Helper function to reset the system via SCMI.
*/
void __dead2 sq_scmi_sys_shutdown(void)
{
sq_scmi_system_off(SCMI_SYS_PWR_SHUTDOWN);
}
void __dead2 sq_scmi_sys_reboot(void)
{
sq_scmi_system_off(SCMI_SYS_PWR_COLD_RESET);

View File

@ -45,6 +45,7 @@ void sq_mmap_setup(uintptr_t total_base, size_t total_size,
/* 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 */

View File

@ -113,6 +113,9 @@ void sq_pwr_domain_off(const psci_power_state_t *target_state)
void __dead2 sq_system_off(void)
{
#if SQ_USE_SCMI_DRIVER
sq_scmi_sys_shutdown();
#else
volatile uint32_t *gpio = (uint32_t *)PLAT_SQ_GPIO_BASE;
/* set PD[9] high to power off the system */
@ -139,6 +142,7 @@ void __dead2 sq_system_off(void)
wfi();
ERROR("SQ System Off: operation not handled.\n");
panic();
#endif
}
void __dead2 sq_system_reset(void)