Skip to contentSkip to conversation

mmc: sdhci: Enable high speed support for MMC cards

PATCH RESEND Superseded Chris Ball 2 participants 6 messages Aug 27, 2010 – Sep 17, 2010

Subsystems (2)
lore
Share & tools
lore

Chris Ball

author
#0 lore raw

PATCH RESEND 1/1 mmc: sdhci: Enable high speed support for MMC cards

Hi,

This patch wasn't responded to -- any feedback from the list?

From: George G. Davis <[email protected]>
Date: Thu, 18 Feb 2010 15:27:53 -0500

Allow high speed mode for high speed capable ver 4.x MMC cards.

Comments and/or feedback appreciated.

[cjb: rebase patch against Linus]
---
 drivers/mmc/host/sdhci.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci.c +5 -2
index fdc9233..8e360e1 100644
@@ -1180,7 +1180,8 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	else
 		ctrl &= ~SDHCI_CTRL_4BITBUS;
 
-	if (ios->timing == MMC_TIMING_SD_HS &&
+	if ((ios->timing == MMC_TIMING_SD_HS ||
+	     ios->timing == MMC_TIMING_MMC_HS) &&
 	    !(host->quirks & SDHCI_QUIRK_NO_HISPD_BIT))
 		ctrl |= SDHCI_CTRL_HISPD;
 	else
@@ -1823,8 +1824,10 @@ int sdhci_add_host(struct sdhci_host *host)
 	if (!(host->quirks & SDHCI_QUIRK_FORCE_1_BIT_DATA))
 		mmc->caps |= MMC_CAP_4_BIT_DATA;
 
-	if (caps & SDHCI_CAN_DO_HISPD)
+	if (caps & SDHCI_CAN_DO_HISPD) {
 		mmc->caps |= MMC_CAP_SD_HIGHSPEED;
+		mmc->caps |= MMC_CAP_MMC_HIGHSPEED;
+    }
 
 	if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION)
 		mmc->caps |= MMC_CAP_NEEDS_POLL;
Signature · 5 lines
1.7.0.1

-- 
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
#1 lore raw

Hi Chris,

Quoted 33 lines · Chris Ball

Hi,

This patch wasn't responded to -- any feedback from the list?

From: George G. Davis <[email protected]>
Date: Thu, 18 Feb 2010 15:27:53 -0500

Allow high speed mode for high speed capable ver 4.x MMC cards.

Comments and/or feedback appreciated.

[cjb: rebase patch against Linus]

---
 drivers/mmc/host/sdhci.c |    7 +++++--

 1 files changed, 5 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci.c +0 -0
index fdc9233..8e360e1 100644
@@ -1180,7 +1180,8 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)

       else
               ctrl &= ~SDHCI_CTRL_4BITBUS;

-       if (ios->timing == MMC_TIMING_SD_HS &&
+       if ((ios->timing == MMC_TIMING_SD_HS ||
+            ios->timing == MMC_TIMING_MMC_HS) && !(host->quirks & SDHCI_QUIRK_NO_HISPD_BIT)) ctrl |= SDHCI_CTRL_HISPD;
       else

drivers/mmc/host/sdhci.c int sdhci_add_host(struct sdhci_host *host) · line 1830

Quoted 8 lines
drivers/mmc/host/sdhci.c +3 -1
@@ -1823,8 +1824,10 @@ int sdhci_add_host(struct sdhci_host *host)
        if (!(host->quirks & SDHCI_QUIRK_FORCE_1_BIT_DATA))
                mmc->caps |= MMC_CAP_4_BIT_DATA;
 
-       if (caps & SDHCI_CAN_DO_HISPD)
+       if (caps & SDHCI_CAN_DO_HISPD) {
                mmc->caps |= MMC_CAP_SD_HIGHSPEED;
+               mmc->caps |= MMC_CAP_MMC_HIGHSPEED;
+    }

It's already patched. you can find it easily at list.

Thank you,
Kyungmin Park

Quoted 14 lines
drivers/mmc/host/sdhci.c +0 -1
        if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION)
                mmc->caps |= MMC_CAP_NEEDS_POLL;
--

1.7.0.1

--
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
--
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

author Acked-by Matt Fleming Acked-by Kyungmin Park
#2 lore raw

Hi Kyungmin,

Quoted 1 line

It's already patched. you can find it easily at list.

I think you're talking about this patch from Zhangfei:

From: Zhangfei Gao <[email protected]>
Date: Mon, 16 Aug 2010 21:15:32 -0400
Subject: [PATCH] sdhci: support MMC_CAP_MMC_HIGHSPEED

---
 drivers/mmc/host/sdhci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/host/sdhci.c +1 -1
index 7855121..913555e 100644
@@ -1823,7 +1823,7 @@ int sdhci_add_host(struct sdhci_host *host)
 		mmc->caps |= MMC_CAP_4_BIT_DATA;
 
 	if (caps & SDHCI_CAN_DO_HISPD)
-		mmc->caps |= MMC_CAP_SD_HIGHSPEED;
+		mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
 
 	if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION)
 		mmc->caps |= MMC_CAP_NEEDS_POLL;
Signature · 26 lines
But this patch wasn't sent to Andrew either -- and so isn't in Linus'
or Andrew's tree -- and it's also only one of the two hunks in George's
earlier patch.  George also had:

--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1180,7 +1180,8 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	else
 		ctrl &= ~SDHCI_CTRL_4BITBUS;
 
-	if (ios->timing == MMC_TIMING_SD_HS &&
+	if ((ios->timing == MMC_TIMING_SD_HS ||
+	     ios->timing == MMC_TIMING_MMC_HS) &&
 	    !(host->quirks & SDHCI_QUIRK_NO_HISPD_BIT))
 		ctrl |= SDHCI_CTRL_HISPD;
 	else
       
So, we still have to send a patch to Andrew, and decide which patch it
should be.  What do you think?

Thanks,

- Chris.
-- 
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
#3 lore raw
Quoted 22 lines · Chris Ball

Hi Kyungmin,

  > It's already patched. you can find it easily at list.

I think you're talking about this patch from Zhangfei:

From: Zhangfei Gao <[email protected]>
Date: Mon, 16 Aug 2010 21:15:32 -0400
Subject: [PATCH] sdhci: support MMC_CAP_MMC_HIGHSPEED

---
 drivers/mmc/host/sdhci.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/host/sdhci.c +0 -0
index 7855121..913555e 100644

drivers/mmc/host/sdhci.c int sdhci_add_host(struct sdhci_host *host)

Quoted 9 lines
drivers/mmc/host/sdhci.c +1 -2
@@ -1823,7 +1823,7 @@ int sdhci_add_host(struct sdhci_host *host)
                mmc->caps |= MMC_CAP_4_BIT_DATA;
 
        if (caps & SDHCI_CAN_DO_HISPD)
-               mmc->caps |= MMC_CAP_SD_HIGHSPEED;
+               mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
 
        if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION)
                mmc->caps |= MMC_CAP_NEEDS_POLL;
--

right, it's required patch and should be merged at this rc window.

Quoted 11 lines

But this patch wasn't sent to Andrew either -- and so isn't in Linus' or Andrew's tree -- and it's also only one of the two hunks in George's earlier patch.  George also had:

drivers/mmc/host/sdhci.c +0 -0
@@ -1180,7 +1180,8 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)

       else
               ctrl &= ~SDHCI_CTRL_4BITBUS;

Quoted 7 lines

-       if (ios->timing == MMC_TIMING_SD_HS &&
+       if ((ios->timing == MMC_TIMING_SD_HS ||
+            ios->timing == MMC_TIMING_MMC_HS) && !(host->quirks & SDHCI_QUIRK_NO_HISPD_BIT)) ctrl |= SDHCI_CTRL_HISPD;
       else

Does it need? I mean when probing the mmc card it doesn't have MMC_TIMING_MMC_HS. so it can't trigger the this condition at my environment.

Quoted 2 lines

So, we still have to send a patch to Andrew, and decide which patch it should be.  What do you think?

Anyone okay.

Quoted 12 lines

Thanks,

- Chris.
--
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
--
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

author
#4 lore raw

PATCH RESEND 1/1 sdhci: Enable high speed support for MMC cards

Quoted 1 line · Kyungmin Park

right, it's required patch and should be merged at this rc window.

Okay. Andrew, would you mind sending the patch below to Linus for -rc4? (If you'd rather it go through someone else, that's fine.)

Quoted 10 lines
Quoted 7 lines

-       if (ios->timing == MMC_TIMING_SD_HS &&
+       if ((ios->timing == MMC_TIMING_SD_HS ||
+            ios->timing == MMC_TIMING_MMC_HS) && !(host->quirks & SDHCI_QUIRK_NO_HISPD_BIT)) ctrl |= SDHCI_CTRL_HISPD;
       else

Does it need? I mean when probing the mmc card it doesn't have MMC_TIMING_MMC_HS. so it can't trigger the this condition at my environment.

I agree; MMC_TIMING_MMC_HS is set in response to moving to HS, which can't happen without this flag. George, let us know if you still think this is necessary.

Here's Zhangfei's patch for merging:

From: Zhangfei Gao <[email protected]>
Date: Mon, 16 Aug 2010 21:15:32 -0400
Subject: [PATCH] sdhci: Enable high-speed support for MMC cards

Support MMC_CAP_MMC_HIGHSPEED.

---
 drivers/mmc/host/sdhci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/host/sdhci.c +1 -1
index 401527d..87ab234 100644
@@ -1824,7 +1824,7 @@ int sdhci_add_host(struct sdhci_host *host)
 		mmc->caps |= MMC_CAP_4_BIT_DATA;
 
 	if (caps & SDHCI_CAN_DO_HISPD)
-		mmc->caps |= MMC_CAP_SD_HIGHSPEED;
+		mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
 
 	if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION)
 		mmc->caps |= MMC_CAP_NEEDS_POLL;
Signature · 5 lines
1.7.0.1

-- 
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
author Applied
#5 lore raw

Re: [PATCH RESEND] sdhci: Enable high speed support for MMC cards

Quoted 29 lines · Chris Ball

From: Zhangfei Gao <[email protected]>
Date: Mon, 16 Aug 2010 21:15:32 -0400
Subject: [PATCH] sdhci: Enable high-speed support for MMC cards

Support MMC_CAP_MMC_HIGHSPEED.

---
 drivers/mmc/host/sdhci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/host/sdhci.c +1 -1
index 401527d..87ab234 100644
@@ -1824,7 +1824,7 @@ int sdhci_add_host(struct sdhci_host *host)
 		mmc->caps |= MMC_CAP_4_BIT_DATA;
 
 	if (caps & SDHCI_CAN_DO_HISPD)
-		mmc->caps |= MMC_CAP_SD_HIGHSPEED;
+		mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
 
 	if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION)
 		mmc->caps |= MMC_CAP_NEEDS_POLL;
Signature · 1 line
1.7.0.1

Pushed to mmc-next, thanks.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child