mmc: renesas_sdhi: special 4tap settings only apply to HS400
Subsystems (2)
Wolfram Sang
maintainerPATCH 1/1 mmc: renesas_sdhi: special 4tap settings only apply to HS400
Previous doucmentation was vague, so we included SDR104 for slow SDnH clock settings. It turns out now, that it is only needed for HS400.
--- drivers/mmc/host/renesas_sdhi_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/renesas_sdhi_core.c +2 -2
@@ -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; }
Signature · 1 line
2.30.2
Hi Wolfram-san,
Thank you for the patch!
Quoted 3 lines
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/
Quoted 5 lines
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 <[email protected]>Signed-off-by Wolfram Sang <[email protected]>
After fixed the typo,
Best regards,
Yoshihiro Shimoda
Wolfram Sang
maintainerQuoted 4 lines
Quoted 2 lines
Previous doucmentation was vague, so we included SDR104 for slow SDnH
s/doucmentation/documentation/
Oops, thank you! v2 sent out now.
Hi Wolfram,
Quoted 6 lines · 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 <[email protected]>Signed-off-by Wolfram Sang <[email protected]>
(after fixing the typo)
drivers/mmc/host/renesas_sdhi_core.c static unsigned int renesas_sdhi_clk_update(struct tmio_mmc_host *host, · line 149
Quoted 11 lines
drivers/mmc/host/renesas_sdhi_core.c +2
-2@@ -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?
drivers/mmc/host/renesas_sdhi_core.c static unsigned int renesas_sdhi_clk_update(struct tmio_mmc_host *host, · line 150
Quoted 1 line
drivers/mmc/host/renesas_sdhi_core.c +0
-0clkh_shift = use_4tap && need_slow_clkh ?1 :2 ;
Unfortunately I don't see a good way to rewrite this, without inflating source code size...
drivers/mmc/host/renesas_sdhi_core.c static unsigned int renesas_sdhi_clk_update(struct tmio_mmc_host *host, · line 152
Quoted 2 lines
drivers/mmc/host/renesas_sdhi_core.c +0
-0ref_clk = priv->clkh; }
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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
Wolfram Sang
maintainerQuoted 7 lines
drivers/mmc/host/renesas_sdhi_core.c static unsigned int renesas_sdhi_clk_update(struct tmio_mmc_host *host, · line 149
Quoted 5 lines
bool use_4tap = priv->quirks && priv->quirks->hs400_4taps;drivers/mmc/host/renesas_sdhi_core.c +1
-2-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.
Wolfram Sang
maintainerQuoted 2 lines
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.