From 7d72bd98aeab0759344a475714b68fd46659738e Mon Sep 17 00:00:00 2001 From: Harvey Hsieh Date: Wed, 28 Dec 2016 21:53:18 +0800 Subject: Tegra210: assert if afflvl0/1 have incorrect state-ids The linux kernel v3.10 does not use System Suspend function ID, whereas v4.4 uses it. This means affinity levels 0/1 will have different state id values during System Suspend entry. This patch updates the assert criteria to check both the state id values. Change-Id: I07fcaf99501cc9622e40d0a2c1eb4a4a160be10a Signed-off-by: Harvey Hsieh Signed-off-by: Varun Wadekar --- plat/nvidia/tegra/soc/t210/plat_psci_handlers.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plat/nvidia/tegra/soc/t210/plat_psci_handlers.c b/plat/nvidia/tegra/soc/t210/plat_psci_handlers.c index 26bf235e..05028a1f 100644 --- a/plat/nvidia/tegra/soc/t210/plat_psci_handlers.c +++ b/plat/nvidia/tegra/soc/t210/plat_psci_handlers.c @@ -111,8 +111,10 @@ int tegra_soc_pwr_domain_suspend(const psci_power_state_t *target_state) if (stateid_afflvl2 == PSTATE_ID_SOC_POWERDN) { - assert(stateid_afflvl0 == PLAT_MAX_OFF_STATE); - assert(stateid_afflvl1 == PLAT_MAX_OFF_STATE); + assert((stateid_afflvl0 == PLAT_MAX_OFF_STATE) || + (stateid_afflvl0 == PSTATE_ID_SOC_POWERDN)); + assert((stateid_afflvl1 == PLAT_MAX_OFF_STATE) || + (stateid_afflvl1 == PSTATE_ID_SOC_POWERDN)); /* suspend the entire soc */ tegra_fc_soc_powerdn(mpidr); -- cgit v1.2.3