mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes.
PATCH 1/1 mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes.
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.
--- drivers/mmc/host/sdhci.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci.c +3 -2
@@ -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 */
Signature · 1 line
1.7.6
Still hoping for comments on the patch.
Thanks
Al
Quoted 38 lines · 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 <[email protected]>---
drivers/mmc/host/sdhci.c | 5 +++--1 files changed, 3 insertions(+), 2 deletions(-)drivers/mmc/host/sdhci.c +3
-3@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Al,
Quoted 1 line · Alan Cooper
Still hoping for comments on the patch.
Thanks for the reminder; adding a few potential reviewers to CC:.
- Chris.
Quoted 33 lines · Al Cooper
Quoted 32 lines
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 <[email protected]>---
drivers/mmc/host/sdhci.c | 5 +++--1 files changed, 3 insertions(+), 2 deletions(-)drivers/mmc/host/sdhci.c +3
-3@@ -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
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child
Nath, Arindam
Acked-byHi,
Quoted 9 lines
-----Original Message-----
From: Chris Ball [mailto:[email protected]]
Sent: Tuesday, April 03, 2012 6:12 AM
To: Alan Cooper
Cc: [email protected]; 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.
Quoted 6 lines
Hi Al,
Quoted 1 line · Alan Cooper
Still hoping for comments on the patch.
Thanks for the reminder; adding a few potential reviewers to CC:.
Regards,
Arindam
Quoted 44 lines
- Chris.
Quoted 6 lines · Al Cooper
Quoted 5 lines
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
Quoted 1 line
Quoted 1 line
capabilities data structure for all V3.0 host controllers, only set
them
Quoted 1 line
Quoted 1 line
if SDR104, SDR50 or DDR50 is set in the host capabilities register.
This
Quoted 15 lines
Quoted 15 lines
will prevent the switch to 1.8V later.
Signed-off-by Al Cooper <[email protected]>---
drivers/mmc/host/sdhci.c | 5 +++--1 files changed, 3 insertions(+), 2 deletions(-)drivers/mmc/host/sdhci.c +0
-0@@ -2762,8 +2762,9 @@ int sdhci_add_host(struct sdhci_host *host) mmc_card_is_removable(mmc)) mmc->caps |= MMC_CAP_NEEDS_POLL;Quoted 3 lines
drivers/mmc/host/sdhci.c int sdhci_add_host(struct sdhci_host *host)
Quoted 3 lines
drivers/mmc/host/sdhci.c +1
-2- /* 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.*/
Quoted 7 lines
Quoted 7 lines
drivers/mmc/host/sdhci.c +2
-1+ 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 <[email protected]> <http://printf.net/>
One Laptop Per Child
Philip Rakity
Acked-byQuoted 69 lines · Arindam
Hi,
Quoted 9 lines
-----Original Message-----
From: Chris Ball [mailto:[email protected]]
Sent: Tuesday, April 03, 2012 6:12 AM
To: Alan Cooper
Cc: [email protected]; 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.Quoted 6 lines
Hi Al,
Quoted 1 line · Alan Cooper
Still hoping for comments on the patch.
Thanks for the reminder; adding a few potential reviewers to CC:.
Acked-by Arindam Nath <[email protected]>Regards,
ArindamQuoted 44 lines
- Chris.
Quoted 6 lines · Al Cooper
Quoted 5 lines
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
Quoted 1 line
Quoted 1 line
capabilities data structure for all V3.0 host controllers, only set
them
Quoted 1 line
Quoted 1 line
if SDR104, SDR50 or DDR50 is set in the host capabilities register.
This
Quoted 15 lines
Quoted 15 lines
will prevent the switch to 1.8V later.
Signed-off-by Al Cooper <[email protected]>--- drivers/mmc/host/sdhci.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)drivers/mmc/host/sdhci.c +0
-0@@ -2762,8 +2762,9 @@ int sdhci_add_host(struct sdhci_host *host) mmc_card_is_removable(mmc)) mmc->caps |=MMC_CAP_NEEDS_POLL ;Quoted 3 lines
drivers/mmc/host/sdhci.c int sdhci_add_host(struct sdhci_host *host)
Quoted 3 lines
drivers/mmc/host/sdhci.c +1
-2-/* 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. */
Quoted 7 lines
Quoted 7 lines
drivers/mmc/host/sdhci.c +2
-1+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 <[email protected]> <http://printf.net/>
One Laptop Per Child
Quoted 67 lines · Philip Rakity
Acked-by Philip Rakity <[email protected]>Quoted 62 lines · Arindam
Hi,
Quoted 9 lines
-----Original Message-----
From: Chris Ball [mailto:[email protected]]
Sent: Tuesday, April 03, 2012 6:12 AM
To: Alan Cooper
Cc: [email protected]; 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.Quoted 6 lines
Hi Al,
Quoted 1 line · Alan Cooper
Still hoping for comments on the patch.
Thanks for the reminder; adding a few potential reviewers to CC:.
Acked-by Arindam Nath <[email protected]>Regards,
ArindamQuoted 38 lines
- Chris.
Quoted 6 lines · Al Cooper
Quoted 5 lines
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
Quoted 1 line
Quoted 1 line
capabilities data structure for all V3.0 host controllers, only set
them
Quoted 1 line
Quoted 1 line
if SDR104, SDR50 or DDR50 is set in the host capabilities register.
This
Quoted 15 lines
Quoted 15 lines
will prevent the switch to 1.8V later.
Signed-off-by Al Cooper <[email protected]>---
drivers/mmc/host/sdhci.c | 5 +++--1 files changed, 3 insertions(+), 2 deletions(-)drivers/mmc/host/sdhci.c +0
-0@@ -2762,8 +2762,9 @@ int sdhci_add_host(struct sdhci_host *host) mmc_card_is_removable(mmc)) mmc->caps |= MMC_CAP_NEEDS_POLL;Quoted 3 lines
drivers/mmc/host/sdhci.c int sdhci_add_host(struct sdhci_host *host)
Quoted 3 lines
drivers/mmc/host/sdhci.c +1
-2- /* 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.*/
Quoted 5 lines
Quoted 5 lines
drivers/mmc/host/sdhci.c +2
-0+ 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 <[email protected]>
Quoted 8 lines
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
--
1.7.6--
Chris Ball <[email protected]> <http://printf.net/>
One Laptop Per Child
Hi,
Quoted 5 lines · Arindam
Quoted 3 lines
Quoted 1 line
Still hoping for comments on the patch.
Thanks for the reminder; adding a few potential reviewers to CC:.
Acked-by Arindam Nath <[email protected]>
Thanks, everyone! Pushed to mmc-next for 3.4 with all of the ACKs.
- Chris.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child