Skip to content

Commit

Permalink
interconnect: Restore sync state by ignoring ipa-virt in provider count
Browse files Browse the repository at this point in the history
commit 20ce30f upstream.

Ignore compatible strings for the IPA virt drivers that were removed in
commits 2fb251c ("interconnect: qcom: sdx55: Drop IP0
interconnects") and 2f37249 ("interconnect: qcom: sc7180: Drop IP0
interconnects") so that the sync state logic can kick in again.
Otherwise all the interconnects in the system will stay pegged at max
speeds because 'providers_count' is always going to be one larger than
the number of drivers that will ever probe on sc7180 or sdx55. This
fixes suspend on sc7180 and sdx55 devices when you don't have a
devicetree patch to remove the ipa-virt compatible node.

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Doug Anderson <dianders@chromium.org>
Cc: Alex Elder <elder@linaro.org>
Cc: Taniya Das <quic_tdas@quicinc.com>
Cc: Mike Tipton <quic_mdtipton@quicinc.com>
Cc: <stable@vger.kernel.org>	# 5.10.x
Fixes: 2fb251c ("interconnect: qcom: sdx55: Drop IP0 interconnects")
Fixes: 2f37249 ("interconnect: qcom: sc7180: Drop IP0 interconnects")
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20220427013226.341209-1-swboyd@chromium.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
bebarino authored and gregkh committed Jun 14, 2022
1 parent bcae8f8 commit 418db40
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/interconnect/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1084,9 +1084,14 @@ static int of_count_icc_providers(struct device_node *np)
{
struct device_node *child;
int count = 0;
const struct of_device_id __maybe_unused ignore_list[] = {
{ .compatible = "qcom,sc7180-ipa-virt" },
{}
};

for_each_available_child_of_node(np, child) {
if (of_property_read_bool(child, "#interconnect-cells"))
if (of_property_read_bool(child, "#interconnect-cells") &&
likely(!of_match_node(ignore_list, child)))
count++;
count += of_count_icc_providers(child);
}
Expand Down

0 comments on commit 418db40

Please sign in to comment.