All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] mmc: renesas_sdhi: special 4tap settings only apply to HS400
@ 2022-04-04 10:05 Wolfram Sang
  2022-04-04 11:52 ` Ulf Hansson
  2022-04-05  7:00 ` Geert Uytterhoeven
  0 siblings, 2 replies; 3+ messages in thread
From: Wolfram Sang @ 2022-04-04 10:05 UTC (permalink / raw)
  To: linux-mmc; +Cc: linux-renesas-soc, Wolfram Sang, Yoshihiro Shimoda

Previous documentation was vague, so we included SDR104 for slow SDnH
clock settings. It turns out now, that it is only needed for HS400.

Fixes: bb6d3fa98a41 ("clk: renesas: rcar-gen3: Switch to new SD clock handling")
Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---

Chages since v1:
* fixed typo in the commit message (Shimoda-san)
* added review tag

 drivers/mmc/host/renesas_sdhi_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index fe63548d816d..89d21231ec5f 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -142,9 +142,9 @@ static unsigned int renesas_sdhi_clk_update(struct tmio_mmc_host *host,
 		return clk_get_rate(priv->clk);
 
 	if (priv->clkh) {
+		/* HS400 with 4TAP needs different clock settings */
 		bool use_4tap = priv->quirks && priv->quirks->hs400_4taps;
-		bool need_slow_clkh = (host->mmc->ios.timing == MMC_TIMING_UHS_SDR104) ||
-				      (host->mmc->ios.timing == MMC_TIMING_MMC_HS400);
+		bool need_slow_clkh = host->mmc->ios.timing == MMC_TIMING_MMC_HS400;
 		clkh_shift = use_4tap && need_slow_clkh ? 1 : 2;
 		ref_clk = priv->clkh;
 	}
-- 
2.30.2


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

* Re: [PATCH v2] mmc: renesas_sdhi: special 4tap settings only apply to HS400
  2022-04-04 10:05 [PATCH v2] mmc: renesas_sdhi: special 4tap settings only apply to HS400 Wolfram Sang
@ 2022-04-04 11:52 ` Ulf Hansson
  2022-04-05  7:00 ` Geert Uytterhoeven
  1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2022-04-04 11:52 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-mmc, linux-renesas-soc, Yoshihiro Shimoda

On Mon, 4 Apr 2022 at 12:05, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
> Previous documentation was vague, so we included SDR104 for slow SDnH
> clock settings. It turns out now, that it is only needed for HS400.
>
> Fixes: bb6d3fa98a41 ("clk: renesas: rcar-gen3: Switch to new SD clock handling")
> Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Applied for fixes, thanks!

Kind regards
Uffe


> ---
>
> Chages since v1:
> * fixed typo in the commit message (Shimoda-san)
> * added review tag
>
>  drivers/mmc/host/renesas_sdhi_core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> index fe63548d816d..89d21231ec5f 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -142,9 +142,9 @@ static unsigned int renesas_sdhi_clk_update(struct tmio_mmc_host *host,
>                 return clk_get_rate(priv->clk);
>
>         if (priv->clkh) {
> +               /* HS400 with 4TAP needs different clock settings */
>                 bool use_4tap = priv->quirks && priv->quirks->hs400_4taps;
> -               bool need_slow_clkh = (host->mmc->ios.timing == MMC_TIMING_UHS_SDR104) ||
> -                                     (host->mmc->ios.timing == MMC_TIMING_MMC_HS400);
> +               bool need_slow_clkh = host->mmc->ios.timing == MMC_TIMING_MMC_HS400;
>                 clkh_shift = use_4tap && need_slow_clkh ? 1 : 2;
>                 ref_clk = priv->clkh;
>         }
> --
> 2.30.2
>

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

* Re: [PATCH v2] mmc: renesas_sdhi: special 4tap settings only apply to HS400
  2022-04-04 10:05 [PATCH v2] mmc: renesas_sdhi: special 4tap settings only apply to HS400 Wolfram Sang
  2022-04-04 11:52 ` Ulf Hansson
@ 2022-04-05  7:00 ` Geert Uytterhoeven
  1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2022-04-05  7:00 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Linux MMC List, Linux-Renesas, Yoshihiro Shimoda

On Tue, Apr 5, 2022 at 2:26 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Previous documentation was vague, so we included SDR104 for slow SDnH
> clock settings. It turns out now, that it is only needed for HS400.
>
> Fixes: bb6d3fa98a41 ("clk: renesas: rcar-gen3: Switch to new SD clock handling")
> Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2022-04-05  7:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04 10:05 [PATCH v2] mmc: renesas_sdhi: special 4tap settings only apply to HS400 Wolfram Sang
2022-04-04 11:52 ` Ulf Hansson
2022-04-05  7:00 ` Geert Uytterhoeven

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.