All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@microchip.com>
To: ulf.hansson@linaro.org, linux-mmc@vger.kernel.org
Cc: Ludovic Desroches <ludovic.desroches@atmel.com>,
	Ludovic Desroches <ludovic.desroches@microchip.com>
Subject: Re: [RFC PATCH] mmc: core: HS DDR switch, don't change timing before checking status
Date: Fri, 10 Mar 2017 15:33:40 +0100	[thread overview]
Message-ID: <c00eda9a-e655-f97a-4578-56a4dd9b9329@microchip.com> (raw)
In-Reply-To: <20170310142117.6060-1-ludovic.desroches@atmel.com>

Le 10/03/2017 à 15:21, Ludovic Desroches a écrit :
> From: Ludovic Desroches <ludovic.desroches@microchip.com>
> 
> The commit e173f8911f09 mmc: core: Update CMD13 polling policy when
> switch to HS DDR mode in addition to fix the management of CRC error,
> changes the place where the DDR52 timing is set.
> 
> Before this commit, the sequence was:
> - set width to 8 with MMC_HS timing
> - send the switch command
> - check the status
> - set width to 8 with MMC_DDR52 timing
> - send the switch command
> - check the status
> Now:
> - set width to 8 with MMC_HS timing
> - send the switch command
> - set width to 8 with MMC_DDR52 timing
> - check the status
> 
> It may lead to get an error when checking the status with some devices.
> 
> Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>

If RFC is positive and regression confirmed here
are the tags the shall be added:
Fixes: e173f8911f09 ("mmc: core: Update CMD13 polling policy when switch to HS DDR mode")
Cc: <stable@vger.kernel.org> # v4.10+

> ---
>  drivers/mmc/core/mmc.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 0fccca0..b837148 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -1062,7 +1062,7 @@ static int mmc_select_hs_ddr(struct mmc_card *card)
>  			   EXT_CSD_BUS_WIDTH,
>  			   ext_csd_bits,
>  			   card->ext_csd.generic_cmd6_time,
> -			   MMC_TIMING_MMC_DDR52,
> +			   0,
>  			   true, true, true);
>  	if (err) {
>  		pr_err("%s: switch to bus width %d ddr failed\n",
> @@ -1106,6 +1106,9 @@ static int mmc_select_hs_ddr(struct mmc_card *card)
>  	if (err)
>  		err = __mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330);
>  
> +	if (!err)
> +		mmc_set_timing(host, MMC_TIMING_MMC_DDR52);
> +
>  	return err;
>  }
>  
> 


-- 
Nicolas Ferre

  reply	other threads:[~2017-03-10 14:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-10  8:30 eMMC initialisation fails: invalid UHS-I mode Ludovic Desroches
2017-03-10 14:21 ` [RFC PATCH] mmc: core: HS DDR switch, don't change timing before checking status Ludovic Desroches
2017-03-10 14:33   ` Nicolas Ferre [this message]
2017-03-15 11:48   ` Nicolas Ferre
2017-03-15 11:48     ` Nicolas Ferre
2017-04-03  8:17     ` Nicolas Ferre
2017-04-03  8:17       ` Nicolas Ferre
2017-03-17 15:14   ` Ulf Hansson
2017-03-17 16:33     ` Ludovic Desroches
2017-03-22  8:41       ` Ulf Hansson
2017-03-22 10:49         ` Ludovic Desroches
2017-03-22 11:18           ` Ulf Hansson
2017-03-22 16:17             ` Ludovic Desroches
2017-03-24 10:51               ` Ludovic Desroches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c00eda9a-e655-f97a-4578-56a4dd9b9329@microchip.com \
    --to=nicolas.ferre@microchip.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ludovic.desroches@atmel.com \
    --cc=ludovic.desroches@microchip.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.