linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC/PATCH RESEND] mmc: sdhci: Enable high speed support for MMC cards
@ 2010-08-27 19:19 Chris Ball
  2010-08-28  5:39 ` Kyungmin Park
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Ball @ 2010-08-27 19:19 UTC (permalink / raw)
  To: linux-mmc; +Cc: George G. Davis

Hi,

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

From: George G. Davis <gdavis@mvista.com>
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.

Signed-off-by: George G. Davis <gdavis@mvista.com>
[cjb: rebase patch against Linus]
Signed-off-by: Chris Ball <cjb@laptop.org>
---
 drivers/mmc/host/sdhci.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index fdc9233..8e360e1 100644
--- 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
@@ -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;
-- 
1.7.0.1

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

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

* Re: [RFC/PATCH RESEND] mmc: sdhci: Enable high speed support for MMC cards
  2010-08-27 19:19 [RFC/PATCH RESEND] mmc: sdhci: Enable high speed support for MMC cards Chris Ball
@ 2010-08-28  5:39 ` Kyungmin Park
  2010-08-28 16:24   ` Chris Ball
  0 siblings, 1 reply; 6+ messages in thread
From: Kyungmin Park @ 2010-08-28  5:39 UTC (permalink / raw)
  To: Chris Ball; +Cc: linux-mmc, George G. Davis

Hi Chris,

On Sat, Aug 28, 2010 at 4:19 AM, Chris Ball <cjb@laptop.org> wrote:
> Hi,
>
> This patch wasn't responded to -- any feedback from the list?
>
> From: George G. Davis <gdavis@mvista.com>
> 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.
>
> Signed-off-by: George G. Davis <gdavis@mvista.com>
> [cjb: rebase patch against Linus]
> Signed-off-by: Chris Ball <cjb@laptop.org>
> ---
>  drivers/mmc/host/sdhci.c |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index fdc9233..8e360e1 100644
> --- 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
> @@ -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
>
>        if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION)
>                mmc->caps |= MMC_CAP_NEEDS_POLL;
> --
> 1.7.0.1
>
> --
> Chris Ball   <cjb@laptop.org>   <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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

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

* Re: [RFC/PATCH RESEND] mmc: sdhci: Enable high speed support for MMC cards
  2010-08-28  5:39 ` Kyungmin Park
@ 2010-08-28 16:24   ` Chris Ball
  2010-08-30  1:34     ` Kyungmin Park
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Ball @ 2010-08-28 16:24 UTC (permalink / raw)
  To: Kyungmin Park; +Cc: linux-mmc, George G. Davis, Zhangfei Gao

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 <zgao6@marvell.com>
Date: Mon, 16 Aug 2010 21:15:32 -0400
Subject: [PATCH] sdhci: support MMC_CAP_MMC_HIGHSPEED

Signed-off-by: Zhangfei Gao <zgao6@marvell.com>
Acked-by: Matt Fleming <matt@console-pimps.org>
Acked-by: Kyungmin Park <kmpark@infradead.org>
---
 drivers/mmc/host/sdhci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 7855121..913555e 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -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;
-- 

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   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

* Re: [RFC/PATCH RESEND] mmc: sdhci: Enable high speed support for MMC cards
  2010-08-28 16:24   ` Chris Ball
@ 2010-08-30  1:34     ` Kyungmin Park
  2010-08-30 15:56       ` [PATCH RESEND] " Chris Ball
  0 siblings, 1 reply; 6+ messages in thread
From: Kyungmin Park @ 2010-08-30  1:34 UTC (permalink / raw)
  To: Chris Ball; +Cc: linux-mmc, George G. Davis, Zhangfei Gao

On Sun, Aug 29, 2010 at 1:24 AM, Chris Ball <cjb@laptop.org> wrote:
> 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 <zgao6@marvell.com>
> Date: Mon, 16 Aug 2010 21:15:32 -0400
> Subject: [PATCH] sdhci: support MMC_CAP_MMC_HIGHSPEED
>
> Signed-off-by: Zhangfei Gao <zgao6@marvell.com>
> Acked-by: Matt Fleming <matt@console-pimps.org>
> Acked-by: Kyungmin Park <kmpark@infradead.org>
> ---
>  drivers/mmc/host/sdhci.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 7855121..913555e 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -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.

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

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

Anyone okay.
>
> Thanks,
>
> - Chris.
> --
> Chris Ball   <cjb@laptop.org>   <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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

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

* [PATCH RESEND] sdhci: Enable high speed support for MMC cards
  2010-08-30  1:34     ` Kyungmin Park
@ 2010-08-30 15:56       ` Chris Ball
  2010-09-17 22:14         ` Chris Ball
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Ball @ 2010-08-30 15:56 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Kyungmin Park, linux-mmc, George G. Davis, Zhangfei Gao

On Mon, Aug 30, 2010 at 10:34:48AM +0900, Kyungmin Park wrote:
> 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.)

> > -       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 <zgao6@marvell.com>
Date: Mon, 16 Aug 2010 21:15:32 -0400
Subject: [PATCH] sdhci: Enable high-speed support for MMC cards

Support MMC_CAP_MMC_HIGHSPEED.

Signed-off-by: Zhangfei Gao <zgao6@marvell.com>
Acked-by: Matt Fleming <matt@console-pimps.org>
Acked-by: Kyungmin Park <kmpark@infradead.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
---
 drivers/mmc/host/sdhci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 401527d..87ab234 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -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;
-- 
1.7.0.1

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

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

* Re: [PATCH RESEND] sdhci: Enable high speed support for MMC cards
  2010-08-30 15:56       ` [PATCH RESEND] " Chris Ball
@ 2010-09-17 22:14         ` Chris Ball
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Ball @ 2010-09-17 22:14 UTC (permalink / raw)
  To: linux-mmc; +Cc: Kyungmin Park, George G. Davis, Zhangfei Gao, Andrew Morton

On Mon, Aug 30, 2010 at 04:56:44PM +0100, Chris Ball wrote:
> From: Zhangfei Gao <zgao6@marvell.com>
> Date: Mon, 16 Aug 2010 21:15:32 -0400
> Subject: [PATCH] sdhci: Enable high-speed support for MMC cards
> 
> Support MMC_CAP_MMC_HIGHSPEED.
> 
> Signed-off-by: Zhangfei Gao <zgao6@marvell.com>
> Acked-by: Matt Fleming <matt@console-pimps.org>
> Acked-by: Kyungmin Park <kmpark@infradead.org>
> Signed-off-by: Chris Ball <cjb@laptop.org>
> ---
>  drivers/mmc/host/sdhci.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 401527d..87ab234 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -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;
> -- 
> 1.7.0.1

Pushed to mmc-next, thanks.

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

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

end of thread, other threads:[~2010-09-17 22:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-27 19:19 [RFC/PATCH RESEND] mmc: sdhci: Enable high speed support for MMC cards Chris Ball
2010-08-28  5:39 ` Kyungmin Park
2010-08-28 16:24   ` Chris Ball
2010-08-30  1:34     ` Kyungmin Park
2010-08-30 15:56       ` [PATCH RESEND] " Chris Ball
2010-09-17 22:14         ` 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).