From 8539f45dde378969211433622e403ccfe711b2bb Mon Sep 17 00:00:00 2001 From: Varun Wadekar Date: Thu, 1 Sep 2016 14:51:59 -0700 Subject: [PATCH] Tegra: calculate proper power state for affinity levels This patch fixes the 'tegra_soc_get_target_pwr_state' handler used to calculate the proper state for each of the affinity levels. Change-Id: Id16bd15b96f0fc633ffeac2d7a390592fbd0454b Signed-off-by: Varun Wadekar --- plat/nvidia/tegra/common/tegra_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plat/nvidia/tegra/common/tegra_pm.c b/plat/nvidia/tegra/common/tegra_pm.c index 13ae6c4ba..751243657 100644 --- a/plat/nvidia/tegra/common/tegra_pm.c +++ b/plat/nvidia/tegra/common/tegra_pm.c @@ -101,13 +101,13 @@ plat_local_state_t tegra_soc_get_target_pwr_state(unsigned int lvl, const plat_local_state_t *states, unsigned int ncpu) { - plat_local_state_t target = PLAT_MAX_RET_STATE, temp; + plat_local_state_t target = PLAT_MAX_OFF_STATE, temp; assert(ncpu); do { temp = *states++; - if ((temp > target) && (temp != PLAT_MAX_OFF_STATE)) + if ((temp < target)) target = temp; } while (--ncpu);