public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Prathamesh Shete <pshete@nvidia.com>
To: <adrian.hunter@intel.com>, <ulf.hansson@linaro.org>,
	<thierry.reding@gmail.com>, <jonathanh@nvidia.com>,
	<p.zabel@pengutronix.de>, <linux-mmc@vger.kernel.org>,
	<linux-tegra@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <anrao@nvidia.com>, <smangipudi@nvidia.com>, <pshete@nvidia.com>,
	<kyarlagadda@nvidia.com>
Subject: [PATCH v2 4/4] mmc: sdhci-tegra: Use actual clock rate for SW tuning correction
Date: Wed, 14 Sep 2022 15:26:28 +0530	[thread overview]
Message-ID: <20220914095628.26093-4-pshete@nvidia.com> (raw)
In-Reply-To: <20220914095628.26093-1-pshete@nvidia.com>

Ensure tegra_host member "curr_clk_rate" holds the actual clock rate
instead of requested clock rate for proper use during tuning correction
algorithm.

Fixes: ea8fc5953e8b ("mmc: tegra: update hw tuning process")

Signed-off-by: Aniruddha TVS Rao <anrao@nvidia.com>
Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
---
 drivers/mmc/host/sdhci-tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index 7d16dc41fe91..42b018d4ebc3 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -778,7 +778,7 @@ static void tegra_sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
 		dev_err(dev, "failed to set clk rate to %luHz: %d\n",
 			host_clk, err);
 
-	tegra_host->curr_clk_rate = host_clk;
+	tegra_host->curr_clk_rate = clk_get_rate(pltfm_host->clk);
 	if (tegra_host->ddr_signaling)
 		host->max_clk = host_clk;
 	else
-- 
2.17.1


  parent reply	other threads:[~2022-09-14  9:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14  9:56 [PATCH v2 1/4] mmc: sdhci-tegra: Separate T19x and T23x SoC data Prathamesh Shete
2022-09-14  9:56 ` [PATCH v2 2/4] mmc: sdhci-tegra: Add support to program MC streamID Prathamesh Shete
2022-09-14 12:11   ` Thierry Reding
2022-09-15 20:21   ` kernel test robot
2022-09-14  9:56 ` [PATCH v2 3/4] mmc: sdhci-tegra: Issue CMD and DAT resets together Prathamesh Shete
2022-09-14 12:20   ` Thierry Reding
2022-09-14 18:21     ` Adrian Hunter
2022-09-15 10:56       ` Thierry Reding
2022-09-14  9:56 ` Prathamesh Shete [this message]
2022-09-14 12:24   ` [PATCH v2 4/4] mmc: sdhci-tegra: Use actual clock rate for SW tuning correction Thierry Reding
2022-09-14 10:40 ` [PATCH v2 1/4] mmc: sdhci-tegra: Separate T19x and T23x SoC data Thierry Reding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220914095628.26093-4-pshete@nvidia.com \
    --to=pshete@nvidia.com \
    --cc=adrian.hunter@intel.com \
    --cc=anrao@nvidia.com \
    --cc=jonathanh@nvidia.com \
    --cc=kyarlagadda@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=smangipudi@nvidia.com \
    --cc=thierry.reding@gmail.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox