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

[-- Attachment #1: Type: text/plain, Size: 1435 bytes --]

On Wed, Sep 14, 2022 at 03:26:28PM +0530, Prathamesh Shete wrote:
> Ensure tegra_host member "curr_clk_rate" holds the actual clock rate
> instead of requested clock rate for proper use during tuning correction
> algorithm.

Ideally there shouldn't be a deviation between host_clk and the actual
clock rate that was set. Perhaps it'd be good to provide a bit more
information on what the deviation can be and when that happens, as well
as what the consequences are. That would make it a bit more obvious why
this fix is needed.

Thierry

> 
> 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
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-09-14 12:24 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 ` [PATCH v2 4/4] mmc: sdhci-tegra: Use actual clock rate for SW tuning correction Prathamesh Shete
2022-09-14 12:24   ` Thierry Reding [this message]
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=YyHH5i3Hon/QRxLF@orome \
    --to=thierry.reding@gmail.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=pshete@nvidia.com \
    --cc=smangipudi@nvidia.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;
as well as URLs for NNTP newsgroup(s).