Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1983820ybg; Fri, 5 Jun 2020 02:33:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTuq8MwmvbjMhABtc1A5sL6kkCm0PCbRMzFktrXqEIMhdXXIBP6M3ctm+4BiBKCuiJBm02 X-Received: by 2002:aa7:c942:: with SMTP id h2mr8523222edt.23.1591349625895; Fri, 05 Jun 2020 02:33:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591349625; cv=none; d=google.com; s=arc-20160816; b=DFAnrmUg3cQWQvDbUygSk6eKu3rRoB+aOsliux3JDuWR8ZgnunU+6arft3D9tzCm/h wsH/fmoNBPnLfAvoUjEk+egcQ7OC2Qll3UuspFKVtYeaY8+ALIDzlEaNY3w50HqImDRa yZ60HXhwlnsoSVZtAU/qZVoHigMqN8Un8qtg36/jJjlW8P90pKTfdIwsu/RC8HccoftB wEQPG7SVtUJrKcLvpF10m/oEhHgabxKnxKYT48SIOfmhmgwJPCIF+h6jljQVCNmRC4aB Urshgk6h2lvGUk09noca+ggwwn1HoTnYYkwp8NJz4mNGx53b1QrzHyu+VCv/4U1u5KJu 7kHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=31zdr/NUb+FiInyWKY+EAiMEIHP/Dw513zIvc6Q4THY=; b=vcppMwNzvVVpmlUe771YTPxrATOzgQB9zcc5goN47kpQA7yBcf9D7tiDVuWfSCi6Ns aw0qt8ISDvXQ8bcTAjGkDmPNSVqVkjnReAsIj2FS1mDaywD5nc9bA9CtfAPtLBrhqZFF d48GxymA8UrvuI6qutFDJ2pNKSDdUE3uzIm5Emvey7Hj6xUMaUtPYaEt1M1wAPheG+4q C007Z/cUOxXqm6xX8Zqu12nJ8Ib2nRYR414ylQ860t4+wgvCA+CGhkjHCTjHqfzkTL1k lj0NCDUnOMTIsv2jLy4pnb85MsUvUc6Em0nsms2TbnqeskVxcBERwBWzfl/q2JVxhy+Z 0u8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b12si4464199edz.444.2020.06.05.02.33.23; Fri, 05 Jun 2020 02:33:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726607AbgFEJb3 (ORCPT + 99 others); Fri, 5 Jun 2020 05:31:29 -0400 Received: from alexa-out-blr-01.qualcomm.com ([103.229.18.197]:26201 "EHLO alexa-out-blr-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726217AbgFEJbL (ORCPT ); Fri, 5 Jun 2020 05:31:11 -0400 Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by alexa-out-blr-01.qualcomm.com with ESMTP/TLS/AES256-SHA; 05 Jun 2020 15:01:01 +0530 Received: from c-ppvk-linux.qualcomm.com ([10.206.24.34]) by ironmsg01-blr.qualcomm.com with ESMTP; 05 Jun 2020 15:00:33 +0530 Received: by c-ppvk-linux.qualcomm.com (Postfix, from userid 2304101) id 51F1F48DD; Fri, 5 Jun 2020 15:00:32 +0530 (IST) From: Pradeep P V K To: bjorn.andersson@linaro.org, adrian.hunter@intel.com, robh+dt@kernel.org, ulf.hansson@linaro.org, vbadigan@codeaurora.org, sboyd@kernel.org, georgi.djakov@linaro.org, mka@chromium.org Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-mmc-owner@vger.kernel.org, rnayak@codeaurora.org, sibis@codeaurora.org, matthias@chromium.org, Pradeep P V K Subject: =?y?q?=5BPATCH=C2=A0V3=201/2=5D=20mmc=3A=20sdhci-msm=3A=20Add=20interconnect=20bandwidth=20scaling=20support?= Date: Fri, 5 Jun 2020 15:00:26 +0530 Message-Id: <1591349427-27004-2-git-send-email-ppvk@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1591349427-27004-1-git-send-email-ppvk@codeaurora.org> References: <1591269283-24084-1-git-send-email-ppvk@codeaurora.org> <1591349427-27004-1-git-send-email-ppvk@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=y Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Interconnect bandwidth scaling support is now added as a part of OPP [1]. So, make sure interconnect driver is ready before handling interconnect scaling. This change is based on [1] [Patch v8] Introduce OPP bandwidth bindings (https://lkml.org/lkml/2020/5/12/493) [2] [Patch v3] mmc: sdhci-msm: Fix error handling for dev_pm_opp_of_add_table() (https://lkml.org/lkml/2020/5/5/491) Signed-off-by: Pradeep P V K --- drivers/mmc/host/sdhci-msm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index b277dd7..a945e84 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "sdhci-pltfm.h" #include "cqhci.h" @@ -2070,6 +2071,13 @@ static int sdhci_msm_probe(struct platform_device *pdev) } msm_host->bulk_clks[0].clk = clk; + /* Make sure that ICC driver is ready for interconnect bandwdith + * scaling before registering the device for OPP. + */ + ret = dev_pm_opp_of_find_icc_paths(&pdev->dev, NULL); + if (ret) + goto bus_clk_disable; + msm_host->opp_table = dev_pm_opp_set_clkname(&pdev->dev, "core"); if (IS_ERR(msm_host->opp_table)) { ret = PTR_ERR(msm_host->opp_table); -- 1.9.1