allwinner: psci: Drop .pwr_domain_pwr_down_wfi callback

When operating on the local cpu, sunxi_cpu_power_off_self() only "arms"
the ARISC to perform the power-off process; the SCP waits for the CPU to
enter WFI before acutally powering it off. Since this matches the
expected split between .pwr_domain_off and .pwr_domain_pwr_down_wfi, we
can move the sunxi_cpu_power_off_self() call to sunxi_pwr_domain_off().
Since that change makes sunxi_pwr_down_wfi() equivalent to the default
implementation, the callback is no longer needed.

Change-Id: I7d65f66c550d1c69fa5e9945affd7a25b3d3ef42
Signed-off-by: Samuel Holland <samuel@sholland.org>
This commit is contained in:
Samuel Holland 2021-01-23 00:43:52 -06:00
parent a1d349beb0
commit 975d076d4a
1 changed files with 2 additions and 11 deletions

View File

@ -102,17 +102,11 @@ static void sunxi_pwr_domain_off(const psci_power_state_t *target_state)
scpi_map_state(cpu_pwr_state),
scpi_map_state(cluster_pwr_state),
scpi_map_state(system_pwr_state));
} else {
sunxi_cpu_power_off_self();
}
}
static void __dead2 sunxi_pwr_down_wfi(const psci_power_state_t *target_state)
{
sunxi_cpu_power_off_self();
while (1)
wfi();
}
static void sunxi_pwr_domain_on_finish(const psci_power_state_t *target_state)
{
if (is_local_state_off(SYSTEM_PWR_STATE(target_state)))
@ -270,9 +264,6 @@ int plat_setup_psci_ops(uintptr_t sec_entrypoint,
sunxi_psci_ops.pwr_domain_suspend = sunxi_pwr_domain_off;
sunxi_psci_ops.pwr_domain_suspend_finish = sunxi_pwr_domain_on_finish;
sunxi_psci_ops.get_sys_suspend_power_state = sunxi_get_sys_suspend_power_state;
} else {
/* This is only needed when SCPI is unavailable. */
sunxi_psci_ops.pwr_domain_pwr_down_wfi = sunxi_pwr_down_wfi;
}
*psci_ops = &sunxi_psci_ops;