Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1265661

Re: [PATCH 1/2] mmc: sdhci: set bus voltage before enabling bus power

From Ludovic Desroches <ludovic.desroches@atmel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] mmc: sdhci: set bus voltage before enabling bus power
Date 2015-11-09 14:30 +0100
Message-ID <qsUGf-6X1-23@gated-at.bofh.it> (permalink)
References <qrRAL-6pR-25@gated-at.bofh.it> <qrRKr-6IF-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Nov 06, 2015 at 04:59:29PM +0100, Ludovic Desroches wrote:
> When there is a vmmc regulator, only SD Bus Power is set to 1 in the
> Power Control Register. It means SD Bus Voltage Select field is set to 0
> that is a reserved value. The SD Host Controller specification says:
> 'SD Bus Power: Before setting this bit, the SD Host Driver shall set SD
> Bus Voltage Select.' and 'If the Host Driver selects an unsupported
> voltage in the SD B?us Voltage Select field, the Host Controller may
> ignore writes to SD Bus Power and keep its value at zero."
> 
> Having an external regulator means the SD Bus Voltage Select is useless
> but if the Host Controller strictly follows the specification then we
> need to set a valid value.

Ulf,

What is your opinion about this patch?

If the 'no regulator found' message is turned in debug message, I can get
rid of my vmmc regulator but I really think that writing only
SDHCI_POWER_ON is opposite to the sdhci spec. I would say that not
setting the bus voltage is a quirk!

Regards

Ludovic

> 
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> ---
>  drivers/mmc/host/sdhci.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index ac97b46..0cfd7b2 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -1278,13 +1278,6 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned char mode,
>  		spin_unlock_irq(&host->lock);
>  		mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
>  		spin_lock_irq(&host->lock);
> -
> -		if (mode != MMC_POWER_OFF)
> -			sdhci_writeb(host, SDHCI_POWER_ON, SDHCI_POWER_CONTROL);
> -		else
> -			sdhci_writeb(host, 0, SDHCI_POWER_CONTROL);
> -
> -		return;
>  	}
>  
>  	if (mode != MMC_POWER_OFF) {
> -- 
> 2.5.0
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] mmc: sdhci: potentially bad behavior when using vmmc supply Ludovic Desroches <ludovic.desroches@atmel.com> - 2015-11-06 17:00 +0100
  [PATCH 1/2] mmc: sdhci: set bus voltage before enabling bus power Ludovic Desroches <ludovic.desroches@atmel.com> - 2015-11-06 17:10 +0100
    Re: [PATCH 1/2] mmc: sdhci: set bus voltage before enabling bus power Ludovic Desroches <ludovic.desroches@atmel.com> - 2015-11-09 14:30 +0100
      Re: [PATCH 1/2] mmc: sdhci: set bus voltage before enabling bus power Ulf Hansson <ulf.hansson@linaro.org> - 2015-11-09 15:20 +0100
        Re: [PATCH 1/2] mmc: sdhci: set bus voltage before enabling bus power Ludovic Desroches <ludovic.desroches@atmel.com> - 2015-11-09 15:50 +0100
          Re: [PATCH 1/2] mmc: sdhci: set bus voltage before enabling bus power Ulf Hansson <ulf.hansson@linaro.org> - 2015-11-09 17:10 +0100
            Re: [PATCH 1/2] mmc: sdhci: set bus voltage before enabling bus power Ludovic Desroches <ludovic.desroches@atmel.com> - 2015-11-09 17:40 +0100
  [PATCH 2/2] ARM: at91/dt: sama5d2 Xplained: add regulators for sdhci devices Ludovic Desroches <ludovic.desroches@atmel.com> - 2015-11-06 17:10 +0100
  Re: [PATCH 0/2] mmc: sdhci: potentially bad behavior when using vmmc supply Ulf Hansson <ulf.hansson@linaro.org> - 2015-11-06 17:50 +0100
    Re: [PATCH 0/2] mmc: sdhci: potentially bad behavior when using vmmc  supply Ludovic Desroches <ludovic.desroches@atmel.com> - 2015-11-09 08:50 +0100
      Re: [PATCH 0/2] mmc: sdhci: potentially bad behavior when using vmmc supply Ulf Hansson <ulf.hansson@linaro.org> - 2015-11-09 10:40 +0100
        Re: [PATCH 0/2] mmc: sdhci: potentially bad behavior when using vmmc  supply Ludovic Desroches <ludovic.desroches@atmel.com> - 2015-11-09 11:30 +0100
          Re: [PATCH 0/2] mmc: sdhci: potentially bad behavior when using vmmc supply Ulf Hansson <ulf.hansson@linaro.org> - 2015-11-09 12:00 +0100
            Re: [PATCH 0/2] mmc: sdhci: potentially bad behavior when using vmmc  supply Ludovic Desroches <ludovic.desroches@atmel.com> - 2015-11-09 14:20 +0100
              Re: [PATCH 0/2] mmc: sdhci: potentially bad behavior when using vmmc supply Ulf Hansson <ulf.hansson@linaro.org> - 2015-11-09 14:20 +0100

csiph-web