* [PATCH] mmc: renesas_sdhi: special 4tap settings only apply to HS400
@ 2022-04-01 12:45 Wolfram Sang
2022-04-04 7:09 ` Yoshihiro Shimoda
2022-04-04 12:14 ` Geert Uytterhoeven
0 siblings, 2 replies; 6+ messages in thread
From: Wolfram Sang @ 2022-04-01 12:45 UTC (permalink / raw)
To: linux-mmc; +Cc: linux-renesas-soc, Yoshihiro Shimoda, Wolfram Sang
Previous doucmentation 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>
---
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 2797a9c0f17d..2a4d314aa027 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -144,9 +144,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] 6+ messages in thread
* RE: [PATCH] mmc: renesas_sdhi: special 4tap settings only apply to HS400
2022-04-01 12:45 [PATCH] mmc: renesas_sdhi: special 4tap settings only apply to HS400 Wolfram Sang
@ 2022-04-04 7:09 ` Yoshihiro Shimoda
2022-04-04 10:05 ` Wolfram Sang
2022-04-04 12:14 ` Geert Uytterhoeven
1 sibling, 1 reply; 6+ messages in thread
From: Yoshihiro Shimoda @ 2022-04-04 7:09 UTC (permalink / raw)
To: Wolfram Sang, linux-mmc@vger.kernel.org; +Cc: linux-renesas-soc@vger.kernel.org
Hi Wolfram-san,
Thank you for the patch!
> From: Wolfram Sang, Sent: Friday, April 1, 2022 9:45 PM
>
> Previous doucmentation was vague, so we included SDR104 for slow SDnH
s/doucmentation/documentation/
> 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>
After fixed the typo,
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Best regards,
Yoshihiro Shimoda
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mmc: renesas_sdhi: special 4tap settings only apply to HS400
2022-04-04 7:09 ` Yoshihiro Shimoda
@ 2022-04-04 10:05 ` Wolfram Sang
0 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2022-04-04 10:05 UTC (permalink / raw)
To: Yoshihiro Shimoda
Cc: linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 154 bytes --]
> > Previous doucmentation was vague, so we included SDR104 for slow SDnH
>
> s/doucmentation/documentation/
Oops, thank you! v2 sent out now.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mmc: renesas_sdhi: special 4tap settings only apply to HS400
2022-04-01 12:45 [PATCH] mmc: renesas_sdhi: special 4tap settings only apply to HS400 Wolfram Sang
2022-04-04 7:09 ` Yoshihiro Shimoda
@ 2022-04-04 12:14 ` Geert Uytterhoeven
2022-04-04 12:16 ` Wolfram Sang
2022-04-06 20:14 ` Wolfram Sang
1 sibling, 2 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2022-04-04 12:14 UTC (permalink / raw)
To: Wolfram Sang; +Cc: Linux MMC List, Linux-Renesas, Yoshihiro Shimoda
Hi Wolfram,
On Fri, Apr 1, 2022 at 11:49 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Previous doucmentation 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>
(after fixing the typo)
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -144,9 +144,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;
I'm wondering if we've lost the critical mass for keeping the bools?
> clkh_shift = use_4tap && need_slow_clkh ? 1 : 2;
Unfortunately I don't see a good way to rewrite this, without inflating
source code size...
> ref_clk = priv->clkh;
> }
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] 6+ messages in thread
* Re: [PATCH] mmc: renesas_sdhi: special 4tap settings only apply to HS400
2022-04-04 12:14 ` Geert Uytterhoeven
@ 2022-04-04 12:16 ` Wolfram Sang
2022-04-06 20:14 ` Wolfram Sang
1 sibling, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2022-04-04 12:16 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Linux MMC List, Linux-Renesas, Yoshihiro Shimoda
[-- Attachment #1: Type: text/plain, Size: 471 bytes --]
> > 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;
>
> I'm wondering if we've lost the critical mass for keeping the bools?
Might be. I'll think about it.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mmc: renesas_sdhi: special 4tap settings only apply to HS400
2022-04-04 12:14 ` Geert Uytterhoeven
2022-04-04 12:16 ` Wolfram Sang
@ 2022-04-06 20:14 ` Wolfram Sang
1 sibling, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2022-04-06 20:14 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Linux MMC List, Linux-Renesas, Yoshihiro Shimoda
[-- Attachment #1: Type: text/plain, Size: 283 bytes --]
> I'm wondering if we've lost the critical mass for keeping the bools?
So, I had a look at this and think that the current version is still way
better in terms of readability. I think the compilers will optimize
enough. It is not a hot path anyway. So, I'd like to keep the code.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-04-06 21:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-01 12:45 [PATCH] mmc: renesas_sdhi: special 4tap settings only apply to HS400 Wolfram Sang
2022-04-04 7:09 ` Yoshihiro Shimoda
2022-04-04 10:05 ` Wolfram Sang
2022-04-04 12:14 ` Geert Uytterhoeven
2022-04-04 12:16 ` Wolfram Sang
2022-04-06 20:14 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox