linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: core: Fix Low speed mmc card detection failure
@ 2012-01-19  3:26 Girish K S
  2012-01-31  3:38 ` Girish K S
  2012-02-04 22:33 ` Chris Ball
  0 siblings, 2 replies; 3+ messages in thread
From: Girish K S @ 2012-01-19  3:26 UTC (permalink / raw)
  To: linux-mmc; +Cc: cjb, patches, linux-samsung-soc, Girish K S

This patch fixes the failure of low speed mmc card detection

Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
---
 drivers/mmc/core/mmc.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index dc03291..2bc586b 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1020,7 +1020,8 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
 			err = mmc_select_hs200(card);
 		else if	(host->caps & MMC_CAP_MMC_HIGHSPEED)
 			err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
-					 EXT_CSD_HS_TIMING, 1, 0);
+					 EXT_CSD_HS_TIMING, 1,
+					 card->ext_csd.generic_cmd6_time);
 
 		if (err && err != -EBADMSG)
 			goto free_card;
@@ -1130,7 +1131,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
 	 * Activate wide bus and DDR (if supported).
 	 */
 	if (!mmc_card_hs200(card) &&
-	    (card->csd.mmca_vsn >= CSD_SPEC_VER_3) &&
+	    (card->csd.mmca_vsn >= CSD_SPEC_VER_4) &&
 	    (host->caps & (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA))) {
 		static unsigned ext_csd_bits[][2] = {
 			{ EXT_CSD_BUS_WIDTH_8, EXT_CSD_DDR_BUS_WIDTH_8 },
-- 
1.7.1


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

* Re: [PATCH] mmc: core: Fix Low speed mmc card detection failure
  2012-01-19  3:26 [PATCH] mmc: core: Fix Low speed mmc card detection failure Girish K S
@ 2012-01-31  3:38 ` Girish K S
  2012-02-04 22:33 ` Chris Ball
  1 sibling, 0 replies; 3+ messages in thread
From: Girish K S @ 2012-01-31  3:38 UTC (permalink / raw)
  To: linux-mmc; +Cc: cjb, patches, linux-samsung-soc, Girish K S

Hi Chris,
can you consider this patch in your next branch.

regards
Girish K S

On 19 January 2012 08:56, Girish K S <girish.shivananjappa@linaro.org> wrote:
> This patch fixes the failure of low speed mmc card detection
>
> Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
> ---
>  drivers/mmc/core/mmc.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index dc03291..2bc586b 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -1020,7 +1020,8 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
>                        err = mmc_select_hs200(card);
>                else if (host->caps & MMC_CAP_MMC_HIGHSPEED)
>                        err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
> -                                        EXT_CSD_HS_TIMING, 1, 0);
> +                                        EXT_CSD_HS_TIMING, 1,
> +                                        card->ext_csd.generic_cmd6_time);
>
>                if (err && err != -EBADMSG)
>                        goto free_card;
> @@ -1130,7 +1131,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
>         * Activate wide bus and DDR (if supported).
>         */
>        if (!mmc_card_hs200(card) &&
> -           (card->csd.mmca_vsn >= CSD_SPEC_VER_3) &&
> +           (card->csd.mmca_vsn >= CSD_SPEC_VER_4) &&
>            (host->caps & (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA))) {
>                static unsigned ext_csd_bits[][2] = {
>                        { EXT_CSD_BUS_WIDTH_8, EXT_CSD_DDR_BUS_WIDTH_8 },
> --
> 1.7.1
>

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

* Re: [PATCH] mmc: core: Fix Low speed mmc card detection failure
  2012-01-19  3:26 [PATCH] mmc: core: Fix Low speed mmc card detection failure Girish K S
  2012-01-31  3:38 ` Girish K S
@ 2012-02-04 22:33 ` Chris Ball
  1 sibling, 0 replies; 3+ messages in thread
From: Chris Ball @ 2012-02-04 22:33 UTC (permalink / raw)
  To: Girish K S; +Cc: linux-mmc, patches, linux-samsung-soc

Hi,

On Wed, Jan 18 2012, Girish K S wrote:
> This patch fixes the failure of low speed mmc card detection
>
> Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
> ---
>  drivers/mmc/core/mmc.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index dc03291..2bc586b 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -1020,7 +1020,8 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
>  			err = mmc_select_hs200(card);
>  		else if	(host->caps & MMC_CAP_MMC_HIGHSPEED)
>  			err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
> -					 EXT_CSD_HS_TIMING, 1, 0);
> +					 EXT_CSD_HS_TIMING, 1,
> +					 card->ext_csd.generic_cmd6_time);
>  
>  		if (err && err != -EBADMSG)
>  			goto free_card;
> @@ -1130,7 +1131,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
>  	 * Activate wide bus and DDR (if supported).
>  	 */
>  	if (!mmc_card_hs200(card) &&
> -	    (card->csd.mmca_vsn >= CSD_SPEC_VER_3) &&
> +	    (card->csd.mmca_vsn >= CSD_SPEC_VER_4) &&
>  	    (host->caps & (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA))) {
>  		static unsigned ext_csd_bits[][2] = {
>  			{ EXT_CSD_BUS_WIDTH_8, EXT_CSD_DDR_BUS_WIDTH_8 },

Thanks, pushed to mmc-next for 3.3.

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

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-19  3:26 [PATCH] mmc: core: Fix Low speed mmc card detection failure Girish K S
2012-01-31  3:38 ` Girish K S
2012-02-04 22:33 ` 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).