From 5b2a7813a8781333f7bda3bacdaf9c19835071fc Mon Sep 17 00:00:00 2001 From: Deepak Pandey Date: Tue, 10 Oct 2017 21:34:32 +0530 Subject: [PATCH] css_pm_scmi: optimise cpu suspend to remove redundant scmi call In css platforms where the cpu/cluster management is done by the hardware, software does need to issue certain scmi requests. This patch wraps those scmi calls around the HW_ASSISTED_COHERENCY build option to remove them on platforms that have this hardware support. Change-Id: Ie818e234484ef18549aa7f977aef5c3f0fc26c27 Signed-off-by: Deepak Pandey Signed-off-by: Amit Daniel Kachhap Signed-off-by: Nariman Poushin --- plat/arm/css/drivers/scp/css_pm_scmi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plat/arm/css/drivers/scp/css_pm_scmi.c b/plat/arm/css/drivers/scp/css_pm_scmi.c index 70322677..cb39da27 100644 --- a/plat/arm/css/drivers/scp/css_pm_scmi.c +++ b/plat/arm/css/drivers/scp/css_pm_scmi.c @@ -79,8 +79,7 @@ ARM_INSTANTIATE_LOCK; */ void css_scp_suspend(const struct psci_power_state *target_state) { - int lvl, ret; - uint32_t scmi_pwr_state = 0; + int ret; /* At least power domain level 0 should be specified to be suspended */ assert(target_state->pwr_domain_state[ARM_PWR_LVL0] == @@ -99,7 +98,9 @@ void css_scp_suspend(const struct psci_power_state *target_state) } return; } - +#if !HW_ASSISTED_COHERENCY + int lvl; + uint32_t scmi_pwr_state = 0; /* * If we reach here, then assert that power down at system power domain * level is running. @@ -136,6 +137,7 @@ void css_scp_suspend(const struct psci_power_state *target_state) ret); panic(); } +#endif } /* -- 2.30.2