Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Zhoujie Wu <zjwu@marvell.com>,
	ulf.hansson@linaro.org, linux-mmc@vger.kernel.org
Cc: nadavh@marvell.com, xigu@marvell.com, xswang@marvell.com,
	dingwei@marvell.com, kostap@marvell.com, hannah@marvell.com,
	hongd@marvell.com, dougj@marvell.com, ygao@marvell.com,
	liuw@marvell.com, gregory.clement@free-electrons.com,
	thomas.petazzoni@free-electrons.com
Subject: Re: [PATCH v4] mmc: sdhci-xenon: wait 5ms after set 1.8V signal enable
Date: Tue, 19 Dec 2017 09:24:57 +0200	[thread overview]
Message-ID: <77625101-e03e-18b1-9524-639baefcdda6@intel.com> (raw)
In-Reply-To: <1513636727-4503-1-git-send-email-zjwu@marvell.com>

On 19/12/17 00:38, Zhoujie Wu wrote:
> According to SD spec 3.00 3.6.1 signal voltage switch
> procedure step 6~8,
> (6) Set 1.8V Signal Enable in the Host Control 2 register.
> (7) Wait 5ms. 1.8V voltage regulator shall be stable within this period.
> (8) If 1.8V Signal Enable is cleared by Host Controller, go to step (12).
> Host should wait 5ms after set 1.8V signal enable bit in
> Host Control 2 register and check if 1.8V is stable or not.
> 
> But current code checks this bit right after set it.
> On some platforms with xenon controller found the bit is
> cleared right away and host reports "1.8V regulator output
> did not became stable" and 5ms delay can help.
> 
> Implement voltage_switch callback for xenon controller to add 5ms
> delay to make sure the 1.8V signal enable bit is set by controller.
> 
> Signed-off-by: Zhoujie Wu <zjwu@marvell.com>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
> v4: move the 5ms delay from sdhci.c to xenon driver.
> v3: give more details in comments.
> v2: remove undeliverable cc list email.
> 
>  drivers/mmc/host/sdhci-xenon.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c
> index 0842bbc..4d0791f 100644
> --- a/drivers/mmc/host/sdhci-xenon.c
> +++ b/drivers/mmc/host/sdhci-xenon.c
> @@ -230,7 +230,14 @@ static void xenon_set_power(struct sdhci_host *host, unsigned char mode,
>  		mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
>  }
>  
> +static void xenon_voltage_switch(struct sdhci_host *host)
> +{
> +	/* Wait for 5ms after set 1.8V signal enable bit */
> +	usleep_range(5000, 5500);
> +}
> +
>  static const struct sdhci_ops sdhci_xenon_ops = {
> +	.voltage_switch		= xenon_voltage_switch,
>  	.set_clock		= sdhci_set_clock,
>  	.set_power		= xenon_set_power,
>  	.set_bus_width		= sdhci_set_bus_width,
> 


  reply	other threads:[~2017-12-19  7:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-18 22:38 [PATCH v4] mmc: sdhci-xenon: wait 5ms after set 1.8V signal enable Zhoujie Wu
2017-12-19  7:24 ` Adrian Hunter [this message]
2017-12-19  7:54 ` 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=77625101-e03e-18b1-9524-639baefcdda6@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=dingwei@marvell.com \
    --cc=dougj@marvell.com \
    --cc=gregory.clement@free-electrons.com \
    --cc=hannah@marvell.com \
    --cc=hongd@marvell.com \
    --cc=kostap@marvell.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=liuw@marvell.com \
    --cc=nadavh@marvell.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=ulf.hansson@linaro.org \
    --cc=xigu@marvell.com \
    --cc=xswang@marvell.com \
    --cc=ygao@marvell.com \
    --cc=zjwu@marvell.com \
    /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