linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci-msm: Do not reset the controller if no card in the slot
@ 2016-06-24 16:24 Georgi Djakov
  2016-07-18 17:46 ` Bjorn Andersson
  2016-07-23  9:37 ` Ulf Hansson
  0 siblings, 2 replies; 4+ messages in thread
From: Georgi Djakov @ 2016-06-24 16:24 UTC (permalink / raw)
  To: ulf.hansson
  Cc: adrian.hunter, iivanov.xz, linux-mmc, linux-kernel,
	linux-arm-msm, georgi.djakov

The controller does not clear the "reset bit" when it is reset without
a card in the slot. Because of this, the following error message is seen
while booting with no plugged SD card.

mmc1: Reset 0x1 never completed.

Add the SDHCI_QUIRK_NO_CARD_NO_RESET quirk to avoid this.

Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
---
 drivers/mmc/host/sdhci-msm.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index ac5700233e12..c613137ae91e 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -477,6 +477,7 @@ static const struct sdhci_ops sdhci_msm_ops = {
 
 static const struct sdhci_pltfm_data sdhci_msm_pdata = {
 	.quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION |
+		  SDHCI_QUIRK_NO_CARD_NO_RESET |
 		  SDHCI_QUIRK_SINGLE_POWER_WRITE,
 	.ops = &sdhci_msm_ops,
 };

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: sdhci-msm: Do not reset the controller if no card in the slot
  2016-06-24 16:24 [PATCH] mmc: sdhci-msm: Do not reset the controller if no card in the slot Georgi Djakov
@ 2016-07-18 17:46 ` Bjorn Andersson
  2016-07-20 10:57   ` Adrian Hunter
  2016-07-23  9:37 ` Ulf Hansson
  1 sibling, 1 reply; 4+ messages in thread
From: Bjorn Andersson @ 2016-07-18 17:46 UTC (permalink / raw)
  To: Georgi Djakov
  Cc: ulf.hansson, adrian.hunter, iivanov.xz, linux-mmc, linux-kernel,
	linux-arm-msm

On Fri 24 Jun 09:24 PDT 2016, Georgi Djakov wrote:

> The controller does not clear the "reset bit" when it is reset without
> a card in the slot. Because of this, the following error message is seen
> while booting with no plugged SD card.
> 
> mmc1: Reset 0x1 never completed.
> 
> Add the SDHCI_QUIRK_NO_CARD_NO_RESET quirk to avoid this.
> 
> Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>

Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  drivers/mmc/host/sdhci-msm.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
> index ac5700233e12..c613137ae91e 100644
> --- a/drivers/mmc/host/sdhci-msm.c
> +++ b/drivers/mmc/host/sdhci-msm.c
> @@ -477,6 +477,7 @@ static const struct sdhci_ops sdhci_msm_ops = {
>  
>  static const struct sdhci_pltfm_data sdhci_msm_pdata = {
>  	.quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION |
> +		  SDHCI_QUIRK_NO_CARD_NO_RESET |
>  		  SDHCI_QUIRK_SINGLE_POWER_WRITE,
>  	.ops = &sdhci_msm_ops,
>  };

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: sdhci-msm: Do not reset the controller if no card in the slot
  2016-07-18 17:46 ` Bjorn Andersson
@ 2016-07-20 10:57   ` Adrian Hunter
  0 siblings, 0 replies; 4+ messages in thread
From: Adrian Hunter @ 2016-07-20 10:57 UTC (permalink / raw)
  To: Bjorn Andersson, Georgi Djakov
  Cc: ulf.hansson, iivanov.xz, linux-mmc, linux-kernel, linux-arm-msm

On 18/07/16 20:46, Bjorn Andersson wrote:
> On Fri 24 Jun 09:24 PDT 2016, Georgi Djakov wrote:
> 
>> The controller does not clear the "reset bit" when it is reset without
>> a card in the slot. Because of this, the following error message is seen
>> while booting with no plugged SD card.
>>
>> mmc1: Reset 0x1 never completed.
>>
>> Add the SDHCI_QUIRK_NO_CARD_NO_RESET quirk to avoid this.
>>
>> Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
>> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
> 
> Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Be aware that SDHCI_QUIRK_NO_CARD_NO_RESET is not well implemented.  It can
result in ->get_cd() being called under spinlock which could be a problem if
a card detect GPIO is used and might sleep.  On the other hand, if you are
not using a card detect GPIO then it shouldn't be a problem.

Otherwise:

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

> 
> Regards,
> Bjorn
> 
>> ---
>>  drivers/mmc/host/sdhci-msm.c |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
>> index ac5700233e12..c613137ae91e 100644
>> --- a/drivers/mmc/host/sdhci-msm.c
>> +++ b/drivers/mmc/host/sdhci-msm.c
>> @@ -477,6 +477,7 @@ static const struct sdhci_ops sdhci_msm_ops = {
>>  
>>  static const struct sdhci_pltfm_data sdhci_msm_pdata = {
>>  	.quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION |
>> +		  SDHCI_QUIRK_NO_CARD_NO_RESET |
>>  		  SDHCI_QUIRK_SINGLE_POWER_WRITE,
>>  	.ops = &sdhci_msm_ops,
>>  };
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: sdhci-msm: Do not reset the controller if no card in the slot
  2016-06-24 16:24 [PATCH] mmc: sdhci-msm: Do not reset the controller if no card in the slot Georgi Djakov
  2016-07-18 17:46 ` Bjorn Andersson
@ 2016-07-23  9:37 ` Ulf Hansson
  1 sibling, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2016-07-23  9:37 UTC (permalink / raw)
  To: Georgi Djakov
  Cc: Adrian Hunter, iivanov.xz, linux-mmc, linux-kernel, linux-arm-msm

On 24 June 2016 at 18:24, Georgi Djakov <georgi.djakov@linaro.org> wrote:
> The controller does not clear the "reset bit" when it is reset without
> a card in the slot. Because of this, the following error message is seen
> while booting with no plugged SD card.
>
> mmc1: Reset 0x1 never completed.
>
> Add the SDHCI_QUIRK_NO_CARD_NO_RESET quirk to avoid this.
>
> Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>

Thanks, applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/host/sdhci-msm.c |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
> index ac5700233e12..c613137ae91e 100644
> --- a/drivers/mmc/host/sdhci-msm.c
> +++ b/drivers/mmc/host/sdhci-msm.c
> @@ -477,6 +477,7 @@ static const struct sdhci_ops sdhci_msm_ops = {
>
>  static const struct sdhci_pltfm_data sdhci_msm_pdata = {
>         .quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION |
> +                 SDHCI_QUIRK_NO_CARD_NO_RESET |
>                   SDHCI_QUIRK_SINGLE_POWER_WRITE,
>         .ops = &sdhci_msm_ops,
>  };

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-23  9:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-24 16:24 [PATCH] mmc: sdhci-msm: Do not reset the controller if no card in the slot Georgi Djakov
2016-07-18 17:46 ` Bjorn Andersson
2016-07-20 10:57   ` Adrian Hunter
2016-07-23  9:37 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).