Re: [PATCH v24 08/15] mmc: renesas_sdhi: Add TMIO_MMC_INTERNAL_DIVIDER flag
From: wsa+renesas
Date: Thu Oct 22 2026 - 05:07:23 EST
Hi Biju,
> > > drivers/mmc/host/renesas_sdhi_core.c:renesas_sdhi_clk_enable() {
> > > ...
> > > if (!mmc->f_max)
> > > mmc->f_max = clk_get_rate(priv->clk);
>
> The SoC with TMIO_MMC_INTERNAL_DIVIDER has always frequency defined in SoC dtsi
> and this condition is skipped. Please let me know should I add a comment here??
"has always defined" is not ensured currently, or?. So, to achieve that
we minimally should
a) make 'max-frequency' a 'required' property for SoCs which have an internal divider.
To make everything more robust (and IMHO also more understandable) we
should also
b) move the above 'if (!mmc->f_max)' block to probe (as 'f_max' only
needs to be set once unlike 'f_min')
c) bail out in the above if block if TMIO_MMC_INTERNAL_DIVIDER is set
because it then is required. A small comment explaining why will make
it easier for our future selves ;)
Makes sense?
Happy hacking,
Wolfram
Attachment:
signature.asc
Description: PGP signature