From: Can Guo <cang@codeaurora.org>
To: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Cc: ulf.hansson@linaro.org, adrian.hunter@intel.com,
asutoshd@codeaurora.org, stummala@codeaurora.org,
sayalil@codeaurora.org, rampraka@codeaurora.org,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
Ritesh Harjani <riteshh@codeaurora.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>
Subject: Re: [PATCH V2] mmc: sdhci-msm: Don't enable PWRSAVE_DLL for certain sdhc hosts
Date: Fri, 07 Feb 2020 20:07:30 +0800 [thread overview]
Message-ID: <45f9b0d60697571ce2c0e987b3754aa7@codeaurora.org> (raw)
In-Reply-To: <1581077075-26011-1-git-send-email-vbadigan@codeaurora.org>
On 2020-02-07 20:04, Veerabhadrarao Badiganti wrote:
> From: Ritesh Harjani <riteshh@codeaurora.org>
>
> SDHC core with new 14lpp and later tech DLL should not enable
> PWRSAVE_DLL since such controller's internal gating cannot meet
> following MCLK requirement:
> When MCLK is gated OFF, it is not gated for less than 0.5us and MCLK
> must be switched on for at-least 1us before DATA starts coming.
>
> Adding support for this requirement.
>
> Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
> Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
> --
Reviewed-by: Can Guo <cang@codeaurora.org>
>
> Changes since V1:
> Condition was not correct in V1, which is corrected in V2
>
> --
> ---
> drivers/mmc/host/sdhci-msm.c | 18 +++++++++++++++---
> 1 file changed, 15 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-msm.c
> b/drivers/mmc/host/sdhci-msm.c
> index c3a160c..aa5b610 100644
> --- a/drivers/mmc/host/sdhci-msm.c
> +++ b/drivers/mmc/host/sdhci-msm.c
> @@ -977,9 +977,21 @@ static int
> sdhci_msm_cm_dll_sdc4_calibration(struct sdhci_host *host)
> goto out;
> }
>
> - config = readl_relaxed(host->ioaddr + msm_offset->core_vendor_spec3);
> - config |= CORE_PWRSAVE_DLL;
> - writel_relaxed(config, host->ioaddr + msm_offset->core_vendor_spec3);
> + /*
> + * Set CORE_PWRSAVE_DLL bit in CORE_VENDOR_SPEC3.
> + * When MCLK is gated OFF, it is not gated for less than 0.5us
> + * and MCLK must be switched on for at-least 1us before DATA
> + * starts coming. Controllers with 14lpp and later tech DLL cannot
> + * guarantee above requirement. So PWRSAVE_DLL should not be
> + * turned on for host controllers using this DLL.
> + */
> + if (!msm_host->use_14lpp_dll_reset) {
> + config = readl_relaxed(host->ioaddr +
> + msm_offset->core_vendor_spec3);
> + config |= CORE_PWRSAVE_DLL;
> + writel_relaxed(config, host->ioaddr +
> + msm_offset->core_vendor_spec3);
> + }
>
> /*
> * Drain writebuffer to ensure above DLL calibration
next prev parent reply other threads:[~2020-02-07 12:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-07 8:01 [PATCH V1] mmc: sdhci-msm: Don't enable PWRSAVE_DLL for certain sdhc hosts Veerabhadrarao Badiganti
2020-02-07 12:04 ` [PATCH V2] " Veerabhadrarao Badiganti
2020-02-07 12:07 ` Can Guo [this message]
2020-02-18 7:11 ` Adrian Hunter
2020-02-18 23:38 ` Ulf Hansson
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=45f9b0d60697571ce2c0e987b3754aa7@codeaurora.org \
--to=cang@codeaurora.org \
--cc=adrian.hunter@intel.com \
--cc=agross@kernel.org \
--cc=asutoshd@codeaurora.org \
--cc=bjorn.andersson@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=rampraka@codeaurora.org \
--cc=riteshh@codeaurora.org \
--cc=sayalil@codeaurora.org \
--cc=stummala@codeaurora.org \
--cc=ulf.hansson@linaro.org \
--cc=vbadigan@codeaurora.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).