Commit 26c22a5e authored by Varun Wadekar's avatar Varun Wadekar
Browse files

Tegra186: sanity check power state type



This patch sanity checks the power state type before use,
from the platform's PSCI handler.

Verified with TFTF Standard Test Suite.

Change-Id: Icd45faac6c023d4ce7f3597b698d01b91a218124
Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
parent 923c221b
...@@ -72,6 +72,11 @@ int32_t tegra_soc_validate_power_state(uint32_t power_state, ...@@ -72,6 +72,11 @@ int32_t tegra_soc_validate_power_state(uint32_t power_state,
case PSTATE_ID_CORE_IDLE: case PSTATE_ID_CORE_IDLE:
case PSTATE_ID_CORE_POWERDN: case PSTATE_ID_CORE_POWERDN:
if (psci_get_pstate_type(power_state) != PSTATE_TYPE_POWERDOWN) {
ret = PSCI_E_INVALID_PARAMS;
break;
}
/* Core powerdown request */ /* Core powerdown request */
req_state->pwr_domain_state[MPIDR_AFFLVL0] = state_id; req_state->pwr_domain_state[MPIDR_AFFLVL0] = state_id;
req_state->pwr_domain_state[MPIDR_AFFLVL1] = state_id; req_state->pwr_domain_state[MPIDR_AFFLVL1] = state_id;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment