aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2021-01-16 01:05:38 -0600
committerSamuel Holland <samuel@sholland.org>2021-01-24 17:13:04 -0600
commita1473c99e69f4ddd89ccde34439dc489a601939a (patch)
treed8fa2d12a6a16ec496d7f0db0d23f66deb05ce1c
parent49e4a5fcadfe6e7f00a875c5241677bef2174b49 (diff)
downloadarm-trusted-firmware-a1473c99e69f4ddd89ccde34439dc489a601939a.tar.gz
allwinner: psci: Drop .get_node_hw_state callback
This optional PSCI function was only implemented when SCPI was available. However, the underlying SCPI function is not able to fulfill the necessary contract. First, the SCPI protocol has no way to represent HW_STANDBY at the CPU power level. Second, the SCPI implementation maintains its own logical view of power states, and its implementation of SCPI_CMD_GET_CSS_POWER_STATE does not actually query the hardware. Thus it cannot provide "the physical view of power state", as required for this function by the PSCI specification. Since the function is optional, drop it. Change-Id: I5f3a0810ac19ddeb3c0c5d35aeb09f09a0b80c1d Signed-off-by: Samuel Holland <samuel@sholland.org>
-rw-r--r--plat/allwinner/common/sunxi_pm.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/plat/allwinner/common/sunxi_pm.c b/plat/allwinner/common/sunxi_pm.c
index e0fa5b3ec..d750d8c1d 100644
--- a/plat/allwinner/common/sunxi_pm.c
+++ b/plat/allwinner/common/sunxi_pm.c
@@ -226,29 +226,6 @@ static void sunxi_get_sys_suspend_power_state(psci_power_state_t *req_state)
req_state->pwr_domain_state[i] = PLAT_MAX_OFF_STATE;
}
-static int sunxi_get_node_hw_state(u_register_t mpidr,
- unsigned int power_level)
-{
- unsigned int cluster_state, cpu_state;
- unsigned int cpu = MPIDR_AFFLVL0_VAL(mpidr);
-
- /* SoC power level (always on if PSCI works). */
- if (power_level == SYSTEM_PWR_LVL)
- return HW_ON;
- if (scpi_get_css_power_state(mpidr, &cpu_state, &cluster_state))
- return PSCI_E_NOT_SUPPORTED;
- /* Cluster power level (full power state available). */
- if (power_level == CLUSTER_PWR_LVL) {
- if (cluster_state == scpi_power_on)
- return HW_ON;
- if (cluster_state == scpi_power_retention)
- return HW_STANDBY;
- return HW_OFF;
- }
- /* CPU power level (one bit boolean for on or off). */
- return ((cpu_state & BIT(cpu)) != 0) ? HW_ON : HW_OFF;
-}
-
static plat_psci_ops_t sunxi_psci_ops = {
.cpu_standby = sunxi_cpu_standby,
.pwr_domain_on = sunxi_pwr_domain_on,
@@ -297,7 +274,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;
- sunxi_psci_ops.get_node_hw_state = sunxi_get_node_hw_state;
} else {
/* This is only needed when SCPI is unavailable. */
sunxi_psci_ops.pwr_domain_pwr_down_wfi = sunxi_pwr_down_wfi;