Merge "refactor(plat/synquacer): update PSCI system_off handling" into integration
This commit is contained in:
commit
590fd53d61
|
@ -189,6 +189,11 @@ void __dead2 sq_scmi_system_off(int state)
|
||||||
/*
|
/*
|
||||||
* Helper function to reset the system via SCMI.
|
* 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)
|
void __dead2 sq_scmi_sys_reboot(void)
|
||||||
{
|
{
|
||||||
sq_scmi_system_off(SCMI_SYS_PWR_COLD_RESET);
|
sq_scmi_system_off(SCMI_SYS_PWR_COLD_RESET);
|
||||||
|
|
|
@ -45,6 +45,7 @@ void sq_mmap_setup(uintptr_t total_base, size_t total_size,
|
||||||
/* SCMI API for power management by SCP */
|
/* SCMI API for power management by SCP */
|
||||||
void sq_scmi_off(const struct psci_power_state *target_state);
|
void sq_scmi_off(const struct psci_power_state *target_state);
|
||||||
void sq_scmi_on(u_register_t mpidr);
|
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_sys_reboot(void);
|
||||||
void __dead2 sq_scmi_system_off(int state);
|
void __dead2 sq_scmi_system_off(int state);
|
||||||
/* SCMI API for vendor specific protocol */
|
/* SCMI API for vendor specific protocol */
|
||||||
|
|
|
@ -113,6 +113,9 @@ void sq_pwr_domain_off(const psci_power_state_t *target_state)
|
||||||
|
|
||||||
void __dead2 sq_system_off(void)
|
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;
|
volatile uint32_t *gpio = (uint32_t *)PLAT_SQ_GPIO_BASE;
|
||||||
|
|
||||||
/* set PD[9] high to power off the system */
|
/* set PD[9] high to power off the system */
|
||||||
|
@ -139,6 +142,7 @@ void __dead2 sq_system_off(void)
|
||||||
wfi();
|
wfi();
|
||||||
ERROR("SQ System Off: operation not handled.\n");
|
ERROR("SQ System Off: operation not handled.\n");
|
||||||
panic();
|
panic();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void __dead2 sq_system_reset(void)
|
void __dead2 sq_system_reset(void)
|
||||||
|
|
Loading…
Reference in New Issue