diff mbox

mmc: core: skip mmc_power_up call from start host

Message ID 1342184235-6912-1-git-send-email-girish.shivananjappa@linaro.org
State New
Headers show

Commit Message

Girish K S July 13, 2012, 12:57 p.m. UTC
The call to the mmc_power_up during the mmc_start_host breaks the card
detection in design-ware host controller. This patch removes the call to
mmc_power_up function during host start.

This fix works fine with sdhci (sdhci compatilble host controller)
and dw_mmc (design-ware host controller). and has no side effect due to
this removal.

Tested on : origen-board and smdk-5250 board.

Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/core/core.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Comments

Venkatraman S July 17, 2012, 10:52 a.m. UTC | #1
On Fri, Jul 13, 2012 at 6:27 PM, Girish K S
<girish.shivananjappa@linaro.org> wrote:
> The call to the mmc_power_up during the mmc_start_host breaks the card
> detection in design-ware host controller. This patch removes the call to
> mmc_power_up function during host start.
>
Please explain why. Which commit introduced it ?

> This fix works fine with sdhci (sdhci compatilble host controller)
> and dw_mmc (design-ware host controller). and has no side effect due to
> this removal.
>
How can you be sure ? What about other hosts ?
Girish K S July 17, 2012, 11:01 a.m. UTC | #2
On 17 July 2012 16:22, S, Venkatraman <svenkatr@ti.com> wrote:
> On Fri, Jul 13, 2012 at 6:27 PM, Girish K S
> <girish.shivananjappa@linaro.org> wrote:
>> The call to the mmc_power_up during the mmc_start_host breaks the card
>> detection in design-ware host controller. This patch removes the call to
>> mmc_power_up function during host start.
>>
> Please explain why. Which commit introduced it ?
dw_mmc card detection is broken by this commit
fa5501890d8974301042e0202d342a6cbe8609f4
>
>> This fix works fine with sdhci (sdhci compatilble host controller)
>> and dw_mmc (design-ware host controller). and has no side effect due to
>> this removal.
>>
> How can you be sure ? What about other hosts ?
I have tested on the available host controllers. It would be helpful
if others test it and let me know whether this change of mine causes
any problem.
Ulf Hansson Aug. 20, 2012, 1:39 p.m. UTC | #3
Hi Girish,

On 13 July 2012 14:57, Girish K S <girish.shivananjappa@linaro.org> wrote:
> The call to the mmc_power_up during the mmc_start_host breaks the card
> detection in design-ware host controller. This patch removes the call to
> mmc_power_up function during host start.
>
> This fix works fine with sdhci (sdhci compatilble host controller)
> and dw_mmc (design-ware host controller). and has no side effect due to
> this removal.
>
> Tested on : origen-board and smdk-5250 board.
>
> Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>  drivers/mmc/core/core.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index 9503cab..503aefc 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -2108,7 +2108,6 @@ void mmc_start_host(struct mmc_host *host)
>  {
>         host->f_init = max(freqs[0], host->f_min);
>         host->rescan_disable = 0;
> -       mmc_power_up(host);

This will introduce a bug (race condition) for host drivers using the
regulator API (from regulator_init_complete) and for eMMC. So please
do not remove this.

>         mmc_detect_change(host, 0);
>  }
>
> --
> 1.7.4.1
>


I suggest you find out more details about why this breaks the card
detection mechanism for your stated boards.

Kind regards
Ulf Hansson
diff mbox

Patch

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 9503cab..503aefc 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2108,7 +2108,6 @@  void mmc_start_host(struct mmc_host *host)
 {
 	host->f_init = max(freqs[0], host->f_min);
 	host->rescan_disable = 0;
-	mmc_power_up(host);
 	mmc_detect_change(host, 0);
 }