* [PATCH] mmc: host: sdhci. UHS Switch failure - cycle power if regulator is used
@ 2012-06-27 16:15 philipspatches
2012-07-09 5:46 ` Aaron Lu
0 siblings, 1 reply; 3+ messages in thread
From: philipspatches @ 2012-06-27 16:15 UTC (permalink / raw)
To: cjb, linux-mmc; +Cc: Philip Rakity
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.
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");
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: host: sdhci. UHS Switch failure - cycle power if regulator is used
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
2012-07-10 3:26 ` Chris Ball
0 siblings, 1 reply; 3+ messages in thread
From: Aaron Lu @ 2012-07-09 5:46 UTC (permalink / raw)
To: philipspatches; +Cc: cjb, linux-mmc, Philip Rakity
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");
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: host: sdhci. UHS Switch failure - cycle power if regulator is used
2012-07-09 5:46 ` Aaron Lu
@ 2012-07-10 3:26 ` Chris Ball
0 siblings, 0 replies; 3+ messages in thread
From: Chris Ball @ 2012-07-10 3:26 UTC (permalink / raw)
To: Aaron Lu; +Cc: philipspatches, linux-mmc, Philip Rakity
Hi,
On Mon, Jul 09 2012, Aaron Lu wrote:
> 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>
Thanks, pushed to mmc-next for 3.6.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-10 3:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2012-07-10 3:26 ` Chris Ball
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox