diff options
author | Varun Wadekar <vwadekar@nvidia.com> | 2017-04-06 17:33:31 -0700 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2017-05-01 15:29:13 -0700 |
commit | e9cb01d96e2615d65885f22731b1ebec0a53fd85 (patch) | |
tree | 91e5e7207b536ada9d1007caa4ce39af2b071ed8 | |
parent | ab3a33fe5c5e3b5e4aea9d9bd88bef361588828b (diff) |
Tegra186: calculate proper power state for cluster/system power down
Earlier, we were setting "System Suspend" as the power state for all system
states. This caused incorrect system state during a cluster power down.
This patch fixes this anomaly and sets the correct power state during a
cluster/system power down.
Change-Id: Ibd002930e0ae103e381e0a19670c3c4d057e7cb7
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
-rw-r--r-- | plat/nvidia/tegra/soc/t186/plat_psci_handlers.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/plat/nvidia/tegra/soc/t186/plat_psci_handlers.c b/plat/nvidia/tegra/soc/t186/plat_psci_handlers.c index 9790b817..a7f41c10 100644 --- a/plat/nvidia/tegra/soc/t186/plat_psci_handlers.c +++ b/plat/nvidia/tegra/soc/t186/plat_psci_handlers.c @@ -188,8 +188,11 @@ plat_local_state_t tegra_soc_get_target_pwr_state(unsigned int lvl, int core_pos = read_mpidr() & MPIDR_CPU_MASK; mce_cstate_info_t cstate_info = { 0 }; - /* get the current core's power state */ - target = *(states + core_pos); + /* get the power state at this level */ + if (lvl == MPIDR_AFFLVL1) + target = *(states + core_pos); + if (lvl == MPIDR_AFFLVL2) + target = *(states + cpu); /* CPU suspend */ if (lvl == MPIDR_AFFLVL1 && target == PSTATE_ID_CORE_POWERDN) { @@ -242,7 +245,8 @@ plat_local_state_t tegra_soc_get_target_pwr_state(unsigned int lvl, } /* System Suspend */ - if ((lvl == MPIDR_AFFLVL2) || (target == PSTATE_ID_SOC_POWERDN)) + if (((lvl == MPIDR_AFFLVL2) || (lvl == MPIDR_AFFLVL1)) && + (target == PSTATE_ID_SOC_POWERDN)) return PSTATE_ID_SOC_POWERDN; /* default state */ |