Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1544965

Re: [PATCH 2/4] mmc: mmc: Add change to set controller to HS400 frequency in enhanced strobe

From Shawn Lin <shawn.lin@rock-chips.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/4] mmc: mmc: Add change to set controller to HS400 frequency in enhanced strobe
Date 2016-12-20 08:40 +0100
Message-ID <sQnbH-2wp-9@gated-at.bofh.it> (permalink)
References <sQlCV-1sf-15@gated-at.bofh.it> <sQlCV-1sf-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 2016/12/20 13:53, Ritesh Harjani wrote:
> Currently mmc_select_hs400es is not setting the desired frequency
> before sending switch command. This makes CMD13 to timeout on
> some controllers.
> Thus add a change to set the desired HS400 frequency
> in mmc_select_hs400es when the timing is switched to HS400.

What is the desired HS400 freq? I guess it is 200MHz, right?

Well, per the spec, it just say "host *may* changes frequency to
<= 200Mhz". So before setting timing to MMC_TIMING_MMC_HS400, we
already reach ext_csd.hs_max_dtr. So it should meet the spec. If
the fact that some controllers would see CMD13 timeout here, I guess
you wouldn't let folks add max-frequency to the DT as if the max freq
is set to just lower than your *desired HS400 freq* , it the same
failure result even you add this patch, right?

the root cause the controllers see failure for CMD13 is it didn't
configure the right delay phase or something similar to fit the timing
under the freq of hs_max_dtr, I guess.

>
> Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
> ---
>  drivers/mmc/core/mmc.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index b61b52f9..eb69497 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -1329,6 +1329,7 @@ static int mmc_select_hs400es(struct mmc_card *card)
>
>  	/* Set host controller to HS400 timing and frequency */
>  	mmc_set_timing(host, MMC_TIMING_MMC_HS400);
> +	mmc_set_bus_speed(card);
>
>  	/* Controller enable enhanced strobe function */
>  	host->ios.enhanced_strobe = true;
>


-- 
Best Regards
Shawn Lin

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/4] mmc: mmc: Add change to set controller to HS400 frequency in enhanced strobe Ritesh Harjani <riteshh@codeaurora.org> - 2016-12-20 07:00 +0100
  Re: [PATCH 2/4] mmc: mmc: Add change to set controller to HS400  frequency in enhanced strobe Shawn Lin <shawn.lin@rock-chips.com> - 2016-12-20 08:40 +0100
    Re: [PATCH 2/4] mmc: mmc: Add change to set controller to HS400  frequency in enhanced strobe Ritesh Harjani <riteshh@codeaurora.org> - 2016-12-20 11:40 +0100
      Re: [PATCH 2/4] mmc: mmc: Add change to set controller to HS400  frequency in enhanced strobe Shawn Lin <shawn.lin@rock-chips.com> - 2016-12-20 12:10 +0100
        Re: [PATCH 2/4] mmc: mmc: Add change to set controller to HS400  frequency in enhanced strobe Ritesh Harjani <riteshh@codeaurora.org> - 2016-12-20 13:10 +0100

csiph-web