Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp439065ybg; Wed, 3 Jun 2020 04:55:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLFajBKWRoqSmANcmiSskZLBCp4BdO3yCH1XQd12u666ie+gBtm80hGrW4VFS4rXtbYfeD X-Received: by 2002:a05:6402:3c1:: with SMTP id t1mr31807953edw.350.1591185312589; Wed, 03 Jun 2020 04:55:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591185312; cv=none; d=google.com; s=arc-20160816; b=o+2hX/5DWoXvR7g3dyP8d5jZh2F+QMSciWTTxVceaVUAhzf4qOXM2CsroCc3/U2bXq 0Lp9Dqo0xa1KvaitpPH0IfUHaRg9xs9ByCeQKUrR6aBIVqKP9pTwgYLkCrMfR1JcIzVJ I3r2s97/kFsX59TplFFRyLHpBkltVvH0u8uVRgl1edhNsZ0MY/ebl2GPs4Enk3f3RbBi Jodezbk/dXBT3gx95oasOZhm1kHl5Q3y9yBF/c0umUSzs4uQfIJ6V/a0hXgJsoFs8PKW 4axvm1/0bNGrhE0qiF1gxIzMKD0mlCf5S5+x33/u7v2x2/yA7+1YXBmdE+N2G7QgdFhN t/Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=MnbKsVV2ZlEOXvNHx0ywcuIwpzxoe8YLhIo5hyVFXgA=; b=s9T0/JgGVkjks9SHB3kgVXEDxfKAbFWYmF/dtvteNqH4wYHn2EGpe+1XvxYK9wSdtv hpNgsL0XqndOmlGw08ZCDK90DZ0vKTsF0Qqnlk4C7C49DxHt8jq+E0dpgleubZGT9uY+ 8x1I+lAJFsstS0L5ubc/2APw8qtqm9+jiWgjVzCqEeGelPgYTQbimAXrwYu0J/qR64yB Z9rHPhXNdEXBYlezqJSEHcqC4mmnp4UuwhZC/hyjjD9Q3jwJNOsrB3vGDfCgeC3b4w49 DInAognm0P3UXNxKDHYyeUTGbv6GT7IrfP1F1iDDefdoy50NoONnQrplbeaPg5LxcWUy Iq1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=RFveqadg; 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 m5si955539ejk.248.2020.06.03.04.54.48; Wed, 03 Jun 2020 04:55:12 -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; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=RFveqadg; 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 S1726088AbgFCLw6 (ORCPT + 99 others); Wed, 3 Jun 2020 07:52:58 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:60625 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725926AbgFCLw5 (ORCPT ); Wed, 3 Jun 2020 07:52:57 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1591185176; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=MnbKsVV2ZlEOXvNHx0ywcuIwpzxoe8YLhIo5hyVFXgA=; b=RFveqadglnwH28+oG5NBEmUwYYevijOpDVt0MfRiSa8Vjaj8D2WanmmKu7usK703pqqIqGQc VaTUxM5sIJKdY3AoWxcuBg2qNc20ZaKz8hMmRdYyoEgIGc8dR8zg5hR60RPTJ70+quaSIuyS CvJQo5Dh88JnGg5XzbQlJosZifo= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n13.prod.us-west-2.postgun.com with SMTP id 5ed78f1709c3530d12a3ef5d (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 03 Jun 2020 11:52:55 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id CA11BC43395; Wed, 3 Jun 2020 11:52:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: sibis) by smtp.codeaurora.org (Postfix) with ESMTPSA id EF534C433CA; Wed, 3 Jun 2020 11:52:54 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 03 Jun 2020 17:22:54 +0530 From: Sibi Sankar To: Pradeep P V K Cc: 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, 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, matthias@chromium.org, linux-arm-msm-owner@vger.kernel.org Subject: Re: [PATCH V1 1/2] mmc: sdhci-msm: Add interconnect bandwidth scaling support In-Reply-To: <1591175376-2374-2-git-send-email-ppvk@codeaurora.org> References: <1591175376-2374-1-git-send-email-ppvk@codeaurora.org> <1591175376-2374-2-git-send-email-ppvk@codeaurora.org> Message-ID: <29826613b412e4f4db4289e292a1fe57@codeaurora.org> X-Sender: sibis@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey Pradeep, Thanks for the patch. On 2020-06-03 14:39, Pradeep P V K wrote: > 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 | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/drivers/mmc/host/sdhci-msm.c > b/drivers/mmc/host/sdhci-msm.c > index b277dd7..bf95484 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" > @@ -1999,6 +2000,7 @@ static int sdhci_msm_probe(struct platform_device > *pdev) > struct sdhci_pltfm_host *pltfm_host; > struct sdhci_msm_host *msm_host; > struct clk *clk; > + struct icc_path *sdhc_path; > int ret; > u16 host_version, core_minor; > u32 core_version, config; > @@ -2070,6 +2072,20 @@ 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. > + */ > + sdhc_path = of_icc_get(&pdev->dev, NULL); > + ret = PTR_ERR_OR_ZERO(sdhc_path); > + if (ret) { > + if (ret == -EPROBE_DEFER) > + dev_info(&pdev->dev, "defer icc path: %d\n", ret); > + else > + dev_err(&pdev->dev, "failed to get icc path:%d\n", ret); > + goto bus_clk_disable; > + } > + icc_put(sdhc_path); ret = dev_pm_opp_of_find_icc_paths(&pdev->dev, NULL); since there are multiple paths described in the bindings you should use ^^ instead and you can drop temporary path as well. > + > 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); -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.