mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
To: Doug Anderson <dianders@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Asutosh Das <asutoshd@codeaurora.org>,
	riteshh@codeaurora.org, stummala@codeaurora.org,
	sayalil@codeaurora.org, Evan Green <evgreen@chromium.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] mmc: sdhci-msm: Re-initialize DLL if MCLK is gated dynamically
Date: Thu, 27 Sep 2018 16:29:50 +0530	[thread overview]
Message-ID: <e6f0c8c6-cd0f-33b9-30da-ab09953449ca@codeaurora.org> (raw)
In-Reply-To: <CAD=FV=VxLR6v3vyimjznrqa1Tj5rPziPQX7Pt+wJRR+xm1N-0A@mail.gmail.com>

Hi Doug,


On 9/26/2018 3:58 AM, Doug Anderson wrote:
> Hi,
>
> On Tue, Sep 25, 2018 at 8:05 AM Veerabhadrarao Badiganti
> <vbadigan@codeaurora.org> wrote:
>> +       /*
>> +        * Whenever core-clock is gated dynamically, it's needed to
>> +        * re-initialize the DLL when the clock is ungated.
>> +        */
>> +       if (msm_host->restore_dll_cfg_needed && msm_host->clk_rate) {
>> +               msm_host->restore_dll_cfg = true;
>> +               mmc_retune_needed(host->mmc);
> Using the boolean "restore_dll_cfg" to communicate like this seems
> really fragile.  I have no basis in fact, but I worry that something
> will happen in the meantime that really ought to invalidate the
> "saved_tuning_phase" but the boolean will still be set.
>
> Is there a reason you can't just call msm_config_cm_dll_phase()
> directly from sdhci_msm_runtime_resume()?  Perhaps after the
> clk_bulk_prepare_enable() call below?

I can do that.

But we don't need to restore the clock phase for all speed modes since 
every mode
doesn't use DLL. Only few speed modes (only SDR104 mode for SD card)
would need to restore DLL setting. So I would need to do some extra checks
for performing this operation for only required speed modes.
And we should re-initialize the DLL first before programming the phase.

I wanted to reuse the existing logic which does all these things. So did 
this way.

>
> -Doug
Thanks
Veera

  reply	other threads:[~2018-09-27 11:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1537887875-29494-1-git-send-email-vbadigan@codeaurora.org>
2018-09-25 15:04 ` [PATCH 1/2] dt-bindings: mmc: sdhci-msm: Add flag for restoring dll Veerabhadrarao Badiganti
2018-09-25 17:38   ` Evan Green
2018-09-27 11:20     ` Veerabhadrarao Badiganti
2018-09-25 15:04 ` [PATCH 2/2] mmc: sdhci-msm: Re-initialize DLL if MCLK is gated dynamically Veerabhadrarao Badiganti
2018-09-25 22:28   ` Doug Anderson
2018-09-27 10:59     ` Veerabhadrarao Badiganti [this message]
2018-09-27 15:21       ` Doug Anderson

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=e6f0c8c6-cd0f-33b9-30da-ab09953449ca@codeaurora.org \
    --to=vbadigan@codeaurora.org \
    --cc=adrian.hunter@intel.com \
    --cc=asutoshd@codeaurora.org \
    --cc=dianders@google.com \
    --cc=evgreen@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riteshh@codeaurora.org \
    --cc=robh+dt@kernel.org \
    --cc=sayalil@codeaurora.org \
    --cc=stummala@codeaurora.org \
    --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

Powered by JetHome