public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Aaron Lu <aaron.lu@amd.com>
To: philipspatches@gmail.com
Cc: cjb@laptop.org, linux-mmc@vger.kernel.org,
	Philip Rakity <prakity@marvell.com>
Subject: Re: [PATCH] mmc: host: sdhci.  UHS Switch failure - cycle power if regulator is used
Date: Mon, 9 Jul 2012 13:46:02 +0800	[thread overview]
Message-ID: <4FFA701A.8010100@amd.com> (raw)
In-Reply-To: <1340813700-10898-1-git-send-email-prakity@marvell.com>

On 06/28/2012 12:15 AM, philipspatches@gmail.com wrote:
> From: Philip Rakity<prakity@marvell.com>
>
> Power needs to be removed from the card when switching to 1.8v fails.
>
> If a regulator is used to control vmmc we need to turn the
> regulator off and then back on otherwise power will not be removed
> from the card.

Reviewed-by: Aaron Lu <aaron.lu@amd.com>

-Aaron

>
> Signed-off-by: Philip Rakity<prakity@marvell.com>
> ---
>   drivers/mmc/host/sdhci.c |    4 ++++
>   1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index f4b8b4d..ef4231a 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -1663,11 +1663,15 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
>   		pwr = sdhci_readb(host, SDHCI_POWER_CONTROL);
>   		pwr&= ~SDHCI_POWER_ON;
>   		sdhci_writeb(host, pwr, SDHCI_POWER_CONTROL);
> +		if (host->vmmc)
> +			regulator_disable(host->vmmc);
>
>   		/* Wait for 1ms as per the spec */
>   		usleep_range(1000, 1500);
>   		pwr |= SDHCI_POWER_ON;
>   		sdhci_writeb(host, pwr, SDHCI_POWER_CONTROL);
> +		if (host->vmmc)
> +			regulator_enable(host->vmmc);
>
>   		pr_info(DRIVER_NAME ": Switching to 1.8V signalling "
>   			"voltage failed, retrying with S18R set to 0\n");



  reply	other threads:[~2012-07-09  6:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27 16:15 [PATCH] mmc: host: sdhci. UHS Switch failure - cycle power if regulator is used philipspatches
2012-07-09  5:46 ` Aaron Lu [this message]
2012-07-10  3:26   ` Chris Ball

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=4FFA701A.8010100@amd.com \
    --to=aaron.lu@amd.com \
    --cc=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=philipspatches@gmail.com \
    --cc=prakity@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