From patchwork Thu Oct 21 13:24:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 12575095 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0A9FC4332F for ; Thu, 21 Oct 2021 13:24:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A6B6E610CB for ; Thu, 21 Oct 2021 13:24:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231379AbhJUN1G (ORCPT ); Thu, 21 Oct 2021 09:27:06 -0400 Received: from mail-0201.mail-europe.com ([51.77.79.158]:48830 "EHLO mail-0201.mail-europe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230379AbhJUN1F (ORCPT ); Thu, 21 Oct 2021 09:27:05 -0400 Date: Thu, 21 Oct 2021 13:24:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1634822686; bh=GpiB0I+KGCnyy1lCsiKsCapszoFphoofSjyFZ0nHIGs=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=GI8gqtgkBVeF+qWYT8VchVgCWZ2lYwmrXZWfaef3wHlPyqn8DkyN5A9Z1MRNcsRDT o4gCG88KtzttIgHAgdD0ROGmZdC8nvK8ETVs9eVtH2HDNNQFak4Ou52C3pBsl8iGoZ 1wYHfgpcpf4YiJroAWJX12cF9Ud66+twXDDTUtuA= To: Georgi Djakov , Andy Gross , Bjorn Andersson , Rob Herring From: Yassine Oudjana Cc: Yassine Oudjana , Dmitry Baryshkov , AngeloGioacchino Del Regno , Marijn Suijten , Konrad Dybcio , Shawn Guo , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Reply-To: Yassine Oudjana Subject: [PATCH RESEND v5 2/5] interconnect: icc-rpm: Add support for bus power domain Message-ID: <20211021132329.234942-3-y.oudjana@protonmail.com> In-Reply-To: <20211021132329.234942-1-y.oudjana@protonmail.com> References: <20211021132329.234942-1-y.oudjana@protonmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add support for attaching to a power domain. This is required for Aggregate 0 NoC on MSM8996, which is powered by a GDSC. Signed-off-by: Yassine Oudjana --- drivers/interconnect/qcom/icc-rpm.c | 7 +++++++ drivers/interconnect/qcom/icc-rpm.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c index ef7999a08c8b..6b918d082ab6 100644 --- a/drivers/interconnect/qcom/icc-rpm.c +++ b/drivers/interconnect/qcom/icc-rpm.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -340,6 +341,12 @@ int qnoc_probe(struct platform_device *pdev) if (ret) return ret; + if (desc->has_bus_pd) { + ret = dev_pm_domain_attach(dev, true); + if (ret) + return ret; + } + provider = &qp->provider; INIT_LIST_HEAD(&provider->nodes); provider->dev = dev; diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qcom/icc-rpm.h index f5744de4da19..fd06a3b9e3f7 100644 --- a/drivers/interconnect/qcom/icc-rpm.h +++ b/drivers/interconnect/qcom/icc-rpm.h @@ -77,6 +77,7 @@ struct qcom_icc_desc { size_t num_nodes; const char * const *clocks; size_t num_clocks; + bool has_bus_pd; bool is_bimc_node; const struct regmap_config *regmap_cfg; unsigned int qos_offset;