All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: dw_mmc: Fix DDR mode support.
@ 2011-08-05  3:35 Seungwon Jeon
  2011-08-05 10:20 ` Will Newton
  2011-08-11 21:38 ` Chris Ball
  0 siblings, 2 replies; 5+ messages in thread
From: Seungwon Jeon @ 2011-08-05  3:35 UTC (permalink / raw)
  To: linux-mmc, cjb; +Cc: linux-kernel, Seungwon Jeon

Host driver can't get a hint of DDR mode through ios->ddr flag anymore.
ios->timing is currently used to inform DDR mode as a substitute.
And capability of MMC_CAP_MMC_HIGHSPEED is added for DDR support.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
---
 drivers/mmc/host/dw_mmc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index d65511e..b412a1d 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -699,7 +699,7 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	}
 
 	/* DDR mode set */
-	if (ios->ddr) {
+	if (ios->timing == MMC_TIMING_UHS_DDR50) {
 		regs = mci_readl(slot->host, UHS_REG);
 		regs |= (0x1 << slot->id) << 16;
 		mci_writel(slot->host, UHS_REG, regs);
@@ -1646,7 +1646,7 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
 			mmc->caps |= MMC_CAP_4_BIT_DATA;
 
 	if (host->pdata->quirks & DW_MCI_QUIRK_HIGHSPEED)
-		mmc->caps |= MMC_CAP_SD_HIGHSPEED;
+		mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
 
 #ifdef CONFIG_MMC_DW_IDMAC
 	mmc->max_segs = host->ring_size;
-- 
1.7.0.4


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

* Re: [PATCH] mmc: dw_mmc: Fix DDR mode support.
  2011-08-05  3:35 [PATCH] mmc: dw_mmc: Fix DDR mode support Seungwon Jeon
@ 2011-08-05 10:20 ` Will Newton
  2011-08-05 21:35   ` Jae hoon Chung
  2011-08-11 21:38 ` Chris Ball
  1 sibling, 1 reply; 5+ messages in thread
From: Will Newton @ 2011-08-05 10:20 UTC (permalink / raw)
  To: Seungwon Jeon; +Cc: linux-mmc, cjb, linux-kernel

On Fri, Aug 5, 2011 at 4:35 AM, Seungwon Jeon <tgih.jun@samsung.com> wrote:
> Host driver can't get a hint of DDR mode through ios->ddr flag anymore.
> ios->timing is currently used to inform DDR mode as a substitute.
> And capability of MMC_CAP_MMC_HIGHSPEED is added for DDR support.
>
> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
> ---
>  drivers/mmc/host/dw_mmc.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index d65511e..b412a1d 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -699,7 +699,7 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
>        }
>
>        /* DDR mode set */
> -       if (ios->ddr) {
> +       if (ios->timing == MMC_TIMING_UHS_DDR50) {
>                regs = mci_readl(slot->host, UHS_REG);
>                regs |= (0x1 << slot->id) << 16;
>                mci_writel(slot->host, UHS_REG, regs);
> @@ -1646,7 +1646,7 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>                        mmc->caps |= MMC_CAP_4_BIT_DATA;
>
>        if (host->pdata->quirks & DW_MCI_QUIRK_HIGHSPEED)
> -               mmc->caps |= MMC_CAP_SD_HIGHSPEED;
> +               mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
>
>  #ifdef CONFIG_MMC_DW_IDMAC
>        mmc->max_segs = host->ring_size;
> --
> 1.7.0.4

Acked-by: Will Newton <will.newton@imgtec.com>

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

* Re: [PATCH] mmc: dw_mmc: Fix DDR mode support.
  2011-08-05 10:20 ` Will Newton
@ 2011-08-05 21:35   ` Jae hoon Chung
  2011-08-08  1:38     ` Seungwon Jeon
  0 siblings, 1 reply; 5+ messages in thread
From: Jae hoon Chung @ 2011-08-05 21:35 UTC (permalink / raw)
  To: Will Newton; +Cc: Seungwon Jeon, linux-mmc, cjb, linux-kernel

Hi Seungwon

This patch is looks fine to me..

Just ask to you...Don't you want to locate MMC_CAP_MMC_HIGHSPEED in platdata?

Regards,
Jaehoon Chung


2011/8/5 Will Newton <will.newton@gmail.com>:
> On Fri, Aug 5, 2011 at 4:35 AM, Seungwon Jeon <tgih.jun@samsung.com> wrote:
>> Host driver can't get a hint of DDR mode through ios->ddr flag anymore.
>> ios->timing is currently used to inform DDR mode as a substitute.
>> And capability of MMC_CAP_MMC_HIGHSPEED is added for DDR support.
>>
>> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
>> ---
>>  drivers/mmc/host/dw_mmc.c |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
>> index d65511e..b412a1d 100644
>> --- a/drivers/mmc/host/dw_mmc.c
>> +++ b/drivers/mmc/host/dw_mmc.c
>> @@ -699,7 +699,7 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
>>        }
>>
>>        /* DDR mode set */
>> -       if (ios->ddr) {
>> +       if (ios->timing == MMC_TIMING_UHS_DDR50) {
>>                regs = mci_readl(slot->host, UHS_REG);
>>                regs |= (0x1 << slot->id) << 16;
>>                mci_writel(slot->host, UHS_REG, regs);
>> @@ -1646,7 +1646,7 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>>                        mmc->caps |= MMC_CAP_4_BIT_DATA;
>>
>>        if (host->pdata->quirks & DW_MCI_QUIRK_HIGHSPEED)
>> -               mmc->caps |= MMC_CAP_SD_HIGHSPEED;
>> +               mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
>>
>>  #ifdef CONFIG_MMC_DW_IDMAC
>>        mmc->max_segs = host->ring_size;
>> --
>> 1.7.0.4
>
> Acked-by: Will Newton <will.newton@imgtec.com>
> --
> 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] 5+ messages in thread

* RE: [PATCH] mmc: dw_mmc: Fix DDR mode support.
  2011-08-05 21:35   ` Jae hoon Chung
@ 2011-08-08  1:38     ` Seungwon Jeon
  0 siblings, 0 replies; 5+ messages in thread
From: Seungwon Jeon @ 2011-08-08  1:38 UTC (permalink / raw)
  To: 'Jae hoon Chung', 'Will Newton'
  Cc: linux-mmc, cjb, linux-kernel

Jaehoon Chung wrote:
> 
> Hi Seungwon
> 
> This patch is looks fine to me..
> 
> Just ask to you...Don't you want to locate MMC_CAP_MMC_HIGHSPEED in
> platdata?

Thank you for your comment.
Of course, I have considered appropriate location for MMC_CAP_MMC_HIGHSPEED.
But it seems to be difficult to distinguish a difference between MMC_CAP_SD_HIGHSPEED and MMC_CAP_MMC_HIGHSPEED,
if DW_MCI_QUIRK_HIGHSPEED is defined.

Beset regards,
Seungwon Jeon.

> 
> Regards,
> Jaehoon Chung
> 
> 
> 2011/8/5 Will Newton <will.newton@gmail.com>:
> > On Fri, Aug 5, 2011 at 4:35 AM, Seungwon Jeon <tgih.jun@samsung.com>
> wrote:
> >> Host driver can't get a hint of DDR mode through ios->ddr flag anymore.
> >> ios->timing is currently used to inform DDR mode as a substitute.
> >> And capability of MMC_CAP_MMC_HIGHSPEED is added for DDR support.
> >>
> >> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
> >> ---
> >>  drivers/mmc/host/dw_mmc.c |    4 ++--
> >>  1 files changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> >> index d65511e..b412a1d 100644
> >> --- a/drivers/mmc/host/dw_mmc.c
> >> +++ b/drivers/mmc/host/dw_mmc.c
> >> @@ -699,7 +699,7 @@ static void dw_mci_set_ios(struct mmc_host *mmc,
> struct mmc_ios *ios)
> >>        }
> >>
> >>        /* DDR mode set */
> >> -       if (ios->ddr) {
> >> +       if (ios->timing == MMC_TIMING_UHS_DDR50) {
> >>                regs = mci_readl(slot->host, UHS_REG);
> >>                regs |= (0x1 << slot->id) << 16;
> >>                mci_writel(slot->host, UHS_REG, regs);
> >> @@ -1646,7 +1646,7 @@ static int __init dw_mci_init_slot(struct dw_mci
> *host, unsigned int id)
> >>                        mmc->caps |= MMC_CAP_4_BIT_DATA;
> >>
> >>        if (host->pdata->quirks & DW_MCI_QUIRK_HIGHSPEED)
> >> -               mmc->caps |= MMC_CAP_SD_HIGHSPEED;
> >> +               mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
> >>
> >>  #ifdef CONFIG_MMC_DW_IDMAC
> >>        mmc->max_segs = host->ring_size;
> >> --
> >> 1.7.0.4
> >
> > Acked-by: Will Newton <will.newton@imgtec.com>
> > --
> > 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
> >
> --
> 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] 5+ messages in thread

* Re: [PATCH] mmc: dw_mmc: Fix DDR mode support.
  2011-08-05  3:35 [PATCH] mmc: dw_mmc: Fix DDR mode support Seungwon Jeon
  2011-08-05 10:20 ` Will Newton
@ 2011-08-11 21:38 ` Chris Ball
  1 sibling, 0 replies; 5+ messages in thread
From: Chris Ball @ 2011-08-11 21:38 UTC (permalink / raw)
  To: Seungwon Jeon; +Cc: linux-mmc, linux-kernel

Hi,

On Thu, Aug 04 2011, Seungwon Jeon wrote:
> Host driver can't get a hint of DDR mode through ios->ddr flag anymore.
> ios->timing is currently used to inform DDR mode as a substitute.
> And capability of MMC_CAP_MMC_HIGHSPEED is added for DDR support.
>
> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
> ---
>  drivers/mmc/host/dw_mmc.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index d65511e..b412a1d 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -699,7 +699,7 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
>  	}
>  
>  	/* DDR mode set */
> -	if (ios->ddr) {
> +	if (ios->timing == MMC_TIMING_UHS_DDR50) {
>  		regs = mci_readl(slot->host, UHS_REG);
>  		regs |= (0x1 << slot->id) << 16;
>  		mci_writel(slot->host, UHS_REG, regs);
> @@ -1646,7 +1646,7 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>  			mmc->caps |= MMC_CAP_4_BIT_DATA;
>  
>  	if (host->pdata->quirks & DW_MCI_QUIRK_HIGHSPEED)
> -		mmc->caps |= MMC_CAP_SD_HIGHSPEED;
> +		mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
>  
>  #ifdef CONFIG_MMC_DW_IDMAC
>  	mmc->max_segs = host->ring_size;

Thanks, pushed to mmc-next for 3.1 with Will's ACK.

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

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

end of thread, other threads:[~2011-08-11 21:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-05  3:35 [PATCH] mmc: dw_mmc: Fix DDR mode support Seungwon Jeon
2011-08-05 10:20 ` Will Newton
2011-08-05 21:35   ` Jae hoon Chung
2011-08-08  1:38     ` Seungwon Jeon
2011-08-11 21:38 ` Chris Ball

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.