linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes.
@ 2012-03-16 19:54 Al Cooper
  2012-04-02 18:29 ` Alan Cooper
  0 siblings, 1 reply; 7+ messages in thread
From: Al Cooper @ 2012-03-16 19:54 UTC (permalink / raw)
  To: linux-mmc, cjb; +Cc: Al Cooper

The driver should not try to switch to 1.8V when the SD 3.0 host
controller does not have any UHS capabilities bits set (SDR50, DDR50
or SDR104). See page 72 of "SD Specifications Part A2 SD Host
Controller Simplified Specification Version 3.00" under
"1.8V Signaling Enable". Instead of setting SDR12 and SDR25 in the host
capabilities data structure for all V3.0 host controllers, only set them
if SDR104, SDR50 or DDR50 is set in the host capabilities register. This
will prevent the switch to 1.8V later.

Signed-off-by: Al Cooper <acooper@gmail.com>
---
 drivers/mmc/host/sdhci.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 8d66706..cdf900e 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2762,8 +2762,9 @@ int sdhci_add_host(struct sdhci_host *host)
 	    mmc_card_is_removable(mmc))
 		mmc->caps |= MMC_CAP_NEEDS_POLL;
 
-	/* UHS-I mode(s) supported by the host controller. */
-	if (host->version >= SDHCI_SPEC_300)
+	/* Any UHS-I mode in caps implies SDR12 and SDR25 support. */
+	if (caps[1] & (SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
+		       SDHCI_SUPPORT_DDR50))
 		mmc->caps |= MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25;
 
 	/* SDR104 supports also implies SDR50 support */
-- 
1.7.6



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

* Re: [PATCH] mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes.
  2012-03-16 19:54 [PATCH] mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes Al Cooper
@ 2012-04-02 18:29 ` Alan Cooper
  2012-04-03  0:42   ` Chris Ball
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Cooper @ 2012-04-02 18:29 UTC (permalink / raw)
  To: linux-mmc, cjb

Still hoping for comments on the patch.

Thanks
Al

On Fri, Mar 16, 2012 at 3:54 PM, Al Cooper <acooper@gmail.com> wrote:
> The driver should not try to switch to 1.8V when the SD 3.0 host
> controller does not have any UHS capabilities bits set (SDR50, DDR50
> or SDR104). See page 72 of "SD Specifications Part A2 SD Host
> Controller Simplified Specification Version 3.00" under
> "1.8V Signaling Enable". Instead of setting SDR12 and SDR25 in the host
> capabilities data structure for all V3.0 host controllers, only set them
> if SDR104, SDR50 or DDR50 is set in the host capabilities register. This
> will prevent the switch to 1.8V later.
>
> Signed-off-by: Al Cooper <acooper@gmail.com>
> ---
>  drivers/mmc/host/sdhci.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 8d66706..cdf900e 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -2762,8 +2762,9 @@ int sdhci_add_host(struct sdhci_host *host)
>            mmc_card_is_removable(mmc))
>                mmc->caps |= MMC_CAP_NEEDS_POLL;
>
> -       /* UHS-I mode(s) supported by the host controller. */
> -       if (host->version >= SDHCI_SPEC_300)
> +       /* Any UHS-I mode in caps implies SDR12 and SDR25 support. */
> +       if (caps[1] & (SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
> +                      SDHCI_SUPPORT_DDR50))
>                mmc->caps |= MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25;
>
>        /* SDR104 supports also implies SDR50 support */
> --
> 1.7.6
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes.
  2012-04-02 18:29 ` Alan Cooper
@ 2012-04-03  0:42   ` Chris Ball
  2012-04-04  3:46     ` Nath, Arindam
  0 siblings, 1 reply; 7+ messages in thread
From: Chris Ball @ 2012-04-03  0:42 UTC (permalink / raw)
  To: Alan Cooper
  Cc: linux-mmc, Girish K S, Ulf Hansson, Nath, Arindam, Philip Rakity

Hi Al,

On Mon, Apr 02 2012, Alan Cooper wrote:
> Still hoping for comments on the patch.

Thanks for the reminder; adding a few potential reviewers to CC:.

- Chris.

> On Fri, Mar 16, 2012 at 3:54 PM, Al Cooper <acooper@gmail.com> wrote:
>> The driver should not try to switch to 1.8V when the SD 3.0 host
>> controller does not have any UHS capabilities bits set (SDR50, DDR50
>> or SDR104). See page 72 of "SD Specifications Part A2 SD Host
>> Controller Simplified Specification Version 3.00" under
>> "1.8V Signaling Enable". Instead of setting SDR12 and SDR25 in the host
>> capabilities data structure for all V3.0 host controllers, only set them
>> if SDR104, SDR50 or DDR50 is set in the host capabilities register. This
>> will prevent the switch to 1.8V later.
>>
>> Signed-off-by: Al Cooper <acooper@gmail.com>
>> ---
>>  drivers/mmc/host/sdhci.c |    5 +++--
>>  1 files changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
>> index 8d66706..cdf900e 100644
>> --- a/drivers/mmc/host/sdhci.c
>> +++ b/drivers/mmc/host/sdhci.c
>> @@ -2762,8 +2762,9 @@ int sdhci_add_host(struct sdhci_host *host)
>>            mmc_card_is_removable(mmc))
>>                mmc->caps |= MMC_CAP_NEEDS_POLL;
>>
>> -       /* UHS-I mode(s) supported by the host controller. */
>> -       if (host->version >= SDHCI_SPEC_300)
>> +       /* Any UHS-I mode in caps implies SDR12 and SDR25 support. */
>> +       if (caps[1] & (SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
>> +                      SDHCI_SUPPORT_DDR50))
>>                mmc->caps |= MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25;
>>
>>        /* SDR104 supports also implies SDR50 support */
>> --
>> 1.7.6

-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

* RE: [PATCH] mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes.
  2012-04-03  0:42   ` Chris Ball
@ 2012-04-04  3:46     ` Nath, Arindam
  2012-04-04  3:58       ` Philip Rakity
  2012-04-04 13:13       ` Chris Ball
  0 siblings, 2 replies; 7+ messages in thread
From: Nath, Arindam @ 2012-04-04  3:46 UTC (permalink / raw)
  To: Chris Ball, Alan Cooper
  Cc: linux-mmc@vger.kernel.org, Girish K S, Ulf Hansson, Philip Rakity

Hi,


> -----Original Message-----
> From: Chris Ball [mailto:cjb@laptop.org]
> Sent: Tuesday, April 03, 2012 6:12 AM
> To: Alan Cooper
> Cc: linux-mmc@vger.kernel.org; Girish K S; Ulf Hansson; Nath, Arindam;
> Philip Rakity
> Subject: Re: [PATCH] mmc: Prevent 1.8V switch for SD hosts that don't
> support UHS modes.
> 
> Hi Al,
> 
> On Mon, Apr 02 2012, Alan Cooper wrote:
> > Still hoping for comments on the patch.
> 
> Thanks for the reminder; adding a few potential reviewers to CC:.

Acked-by: Arindam Nath <arindam.nath@amd.com>

Regards,
Arindam

> 
> - Chris.
> 
> > On Fri, Mar 16, 2012 at 3:54 PM, Al Cooper <acooper@gmail.com> wrote:
> >> The driver should not try to switch to 1.8V when the SD 3.0 host
> >> controller does not have any UHS capabilities bits set (SDR50, DDR50
> >> or SDR104). See page 72 of "SD Specifications Part A2 SD Host
> >> Controller Simplified Specification Version 3.00" under
> >> "1.8V Signaling Enable". Instead of setting SDR12 and SDR25 in the
> host
> >> capabilities data structure for all V3.0 host controllers, only set
> them
> >> if SDR104, SDR50 or DDR50 is set in the host capabilities register.
> This
> >> will prevent the switch to 1.8V later.
> >>
> >> Signed-off-by: Al Cooper <acooper@gmail.com>
> >> ---
> >>  drivers/mmc/host/sdhci.c |    5 +++--
> >>  1 files changed, 3 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> >> index 8d66706..cdf900e 100644
> >> --- a/drivers/mmc/host/sdhci.c
> >> +++ b/drivers/mmc/host/sdhci.c
> >> @@ -2762,8 +2762,9 @@ int sdhci_add_host(struct sdhci_host *host)
> >>            mmc_card_is_removable(mmc))
> >>                mmc->caps |= MMC_CAP_NEEDS_POLL;
> >>
> >> -       /* UHS-I mode(s) supported by the host controller. */
> >> -       if (host->version >= SDHCI_SPEC_300)
> >> +       /* Any UHS-I mode in caps implies SDR12 and SDR25 support.
> */
> >> +       if (caps[1] & (SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
> >> +                      SDHCI_SUPPORT_DDR50))
> >>                mmc->caps |= MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25;
> >>
> >>        /* SDR104 supports also implies SDR50 support */
> >> --
> >> 1.7.6
> 
> --
> Chris Ball   <cjb@laptop.org>   <http://printf.net/>
> One Laptop Per Child


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

* Re: [PATCH] mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes.
  2012-04-04  3:46     ` Nath, Arindam
@ 2012-04-04  3:58       ` Philip Rakity
  2012-04-04  4:31         ` Girish K S
  2012-04-04 13:13       ` Chris Ball
  1 sibling, 1 reply; 7+ messages in thread
From: Philip Rakity @ 2012-04-04  3:58 UTC (permalink / raw)
  To: Chris Ball, linux-mmc@vger.kernel.org
  Cc: Alan Cooper, Girish K S, Nath, Arindam, Ulf Hansson


Acked-by: Philip Rakity <prakity@marvell.com>

On Apr 3, 2012, at 8:46 PM, Nath, Arindam wrote:

> Hi,
> 
> 
>> -----Original Message-----
>> From: Chris Ball [mailto:cjb@laptop.org]
>> Sent: Tuesday, April 03, 2012 6:12 AM
>> To: Alan Cooper
>> Cc: linux-mmc@vger.kernel.org; Girish K S; Ulf Hansson; Nath, Arindam;
>> Philip Rakity
>> Subject: Re: [PATCH] mmc: Prevent 1.8V switch for SD hosts that don't
>> support UHS modes.
>> 
>> Hi Al,
>> 
>> On Mon, Apr 02 2012, Alan Cooper wrote:
>>> Still hoping for comments on the patch.
>> 
>> Thanks for the reminder; adding a few potential reviewers to CC:.
> 
> Acked-by: Arindam Nath <arindam.nath@amd.com>
> 
> Regards,
> Arindam
> 
>> 
>> - Chris.
>> 
>>> On Fri, Mar 16, 2012 at 3:54 PM, Al Cooper <acooper@gmail.com> wrote:
>>>> The driver should not try to switch to 1.8V when the SD 3.0 host
>>>> controller does not have any UHS capabilities bits set (SDR50, DDR50
>>>> or SDR104). See page 72 of "SD Specifications Part A2 SD Host
>>>> Controller Simplified Specification Version 3.00" under
>>>> "1.8V Signaling Enable". Instead of setting SDR12 and SDR25 in the
>> host
>>>> capabilities data structure for all V3.0 host controllers, only set
>> them
>>>> if SDR104, SDR50 or DDR50 is set in the host capabilities register.
>> This
>>>> will prevent the switch to 1.8V later.
>>>> 
>>>> Signed-off-by: Al Cooper <acooper@gmail.com>
>>>> ---
>>>>  drivers/mmc/host/sdhci.c |    5 +++--
>>>>  1 files changed, 3 insertions(+), 2 deletions(-)
>>>> 
>>>> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
>>>> index 8d66706..cdf900e 100644
>>>> --- a/drivers/mmc/host/sdhci.c
>>>> +++ b/drivers/mmc/host/sdhci.c
>>>> @@ -2762,8 +2762,9 @@ int sdhci_add_host(struct sdhci_host *host)
>>>>            mmc_card_is_removable(mmc))
>>>>                mmc->caps |= MMC_CAP_NEEDS_POLL;
>>>> 
>>>> -       /* UHS-I mode(s) supported by the host controller. */
>>>> -       if (host->version >= SDHCI_SPEC_300)
>>>> +       /* Any UHS-I mode in caps implies SDR12 and SDR25 support.
>> */
>>>> +       if (caps[1] & (SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
>>>> +                      SDHCI_SUPPORT_DDR50))
>>>>                mmc->caps |= MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25;
>>>> 
>>>>        /* SDR104 supports also implies SDR50 support */
>>>> --
>>>> 1.7.6
>> 
>> --
>> Chris Ball   <cjb@laptop.org>   <http://printf.net/>
>> One Laptop Per Child
> 


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

* Re: [PATCH] mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes.
  2012-04-04  3:58       ` Philip Rakity
@ 2012-04-04  4:31         ` Girish K S
  0 siblings, 0 replies; 7+ messages in thread
From: Girish K S @ 2012-04-04  4:31 UTC (permalink / raw)
  To: Philip Rakity
  Cc: Chris Ball, linux-mmc@vger.kernel.org, Alan Cooper, Nath, Arindam,
	Ulf Hansson

On 4 April 2012 12:58, Philip Rakity <prakity@marvell.com> wrote:
>
> Acked-by: Philip Rakity <prakity@marvell.com>
>
> On Apr 3, 2012, at 8:46 PM, Nath, Arindam wrote:
>
>> Hi,
>>
>>
>>> -----Original Message-----
>>> From: Chris Ball [mailto:cjb@laptop.org]
>>> Sent: Tuesday, April 03, 2012 6:12 AM
>>> To: Alan Cooper
>>> Cc: linux-mmc@vger.kernel.org; Girish K S; Ulf Hansson; Nath, Arindam;
>>> Philip Rakity
>>> Subject: Re: [PATCH] mmc: Prevent 1.8V switch for SD hosts that don't
>>> support UHS modes.
>>>
>>> Hi Al,
>>>
>>> On Mon, Apr 02 2012, Alan Cooper wrote:
>>>> Still hoping for comments on the patch.
>>>
>>> Thanks for the reminder; adding a few potential reviewers to CC:.
>>
>> Acked-by: Arindam Nath <arindam.nath@amd.com>
>>
>> Regards,
>> Arindam
>>
>>>
>>> - Chris.
>>>
>>>> On Fri, Mar 16, 2012 at 3:54 PM, Al Cooper <acooper@gmail.com> wrote:
>>>>> The driver should not try to switch to 1.8V when the SD 3.0 host
>>>>> controller does not have any UHS capabilities bits set (SDR50, DDR50
>>>>> or SDR104). See page 72 of "SD Specifications Part A2 SD Host
>>>>> Controller Simplified Specification Version 3.00" under
>>>>> "1.8V Signaling Enable". Instead of setting SDR12 and SDR25 in the
>>> host
>>>>> capabilities data structure for all V3.0 host controllers, only set
>>> them
>>>>> if SDR104, SDR50 or DDR50 is set in the host capabilities register.
>>> This
>>>>> will prevent the switch to 1.8V later.
>>>>>
>>>>> Signed-off-by: Al Cooper <acooper@gmail.com>
>>>>> ---
>>>>>  drivers/mmc/host/sdhci.c |    5 +++--
>>>>>  1 files changed, 3 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
>>>>> index 8d66706..cdf900e 100644
>>>>> --- a/drivers/mmc/host/sdhci.c
>>>>> +++ b/drivers/mmc/host/sdhci.c
>>>>> @@ -2762,8 +2762,9 @@ int sdhci_add_host(struct sdhci_host *host)
>>>>>            mmc_card_is_removable(mmc))
>>>>>                mmc->caps |= MMC_CAP_NEEDS_POLL;
>>>>>
>>>>> -       /* UHS-I mode(s) supported by the host controller. */
>>>>> -       if (host->version >= SDHCI_SPEC_300)
>>>>> +       /* Any UHS-I mode in caps implies SDR12 and SDR25 support.
>>> */
>>>>> +       if (caps[1] & (SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
>>>>> +                      SDHCI_SUPPORT_DDR50))
>>>>>                mmc->caps |= MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25;
>>>>>
>>>>>        /* SDR104 supports also implies SDR50 support */
Cross checked with spec.
Acked By: Girish K S <girish.shivananjappa@linaro.org>
>>>>> --
>>>>> 1.7.6
>>>
>>> --
>>> Chris Ball   <cjb@laptop.org>   <http://printf.net/>
>>> One Laptop Per Child
>>
>

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

* Re: [PATCH] mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes.
  2012-04-04  3:46     ` Nath, Arindam
  2012-04-04  3:58       ` Philip Rakity
@ 2012-04-04 13:13       ` Chris Ball
  1 sibling, 0 replies; 7+ messages in thread
From: Chris Ball @ 2012-04-04 13:13 UTC (permalink / raw)
  To: Nath, Arindam
  Cc: Alan Cooper, linux-mmc@vger.kernel.org, Girish K S, Ulf Hansson,
	Philip Rakity

Hi,

On Tue, Apr 03 2012, Nath, Arindam wrote:
>> > Still hoping for comments on the patch.
>> 
>> Thanks for the reminder; adding a few potential reviewers to CC:.
>
> Acked-by: Arindam Nath <arindam.nath@amd.com>

Thanks, everyone!  Pushed to mmc-next for 3.4 with all of the ACKs.

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

end of thread, other threads:[~2012-04-04 13:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-16 19:54 [PATCH] mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes Al Cooper
2012-04-02 18:29 ` Alan Cooper
2012-04-03  0:42   ` Chris Ball
2012-04-04  3:46     ` Nath, Arindam
2012-04-04  3:58       ` Philip Rakity
2012-04-04  4:31         ` Girish K S
2012-04-04 13:13       ` Chris Ball

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).