Commit 5b2a7813 authored by Deepak Pandey's avatar Deepak Pandey Committed by Nariman Poushin
Browse files

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: default avatarDeepak Pandey <Deepak.Pandey@arm.com>
Signed-off-by: default avatarAmit Daniel Kachhap <amit.kachhap@arm.com>
Signed-off-by: default avatarNariman Poushin <nariman.poushin@linaro.org>
parent eb5e1be4
...@@ -79,8 +79,7 @@ ARM_INSTANTIATE_LOCK; ...@@ -79,8 +79,7 @@ ARM_INSTANTIATE_LOCK;
*/ */
void css_scp_suspend(const struct psci_power_state *target_state) void css_scp_suspend(const struct psci_power_state *target_state)
{ {
int lvl, ret; int ret;
uint32_t scmi_pwr_state = 0;
/* At least power domain level 0 should be specified to be suspended */ /* At least power domain level 0 should be specified to be suspended */
assert(target_state->pwr_domain_state[ARM_PWR_LVL0] == assert(target_state->pwr_domain_state[ARM_PWR_LVL0] ==
...@@ -99,7 +98,9 @@ void css_scp_suspend(const struct psci_power_state *target_state) ...@@ -99,7 +98,9 @@ void css_scp_suspend(const struct psci_power_state *target_state)
} }
return; 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 * If we reach here, then assert that power down at system power domain
* level is running. * level is running.
...@@ -136,6 +137,7 @@ void css_scp_suspend(const struct psci_power_state *target_state) ...@@ -136,6 +137,7 @@ void css_scp_suspend(const struct psci_power_state *target_state)
ret); ret);
panic(); panic();
} }
#endif
} }
/* /*
......
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