RE: [PATCH v24 08/15] mmc: renesas_sdhi: Add TMIO_MMC_INTERNAL_DIVIDER flag

From: Biju Das

Date: Fri Oct 23 2026 - 09:32:43 EST


Hi Wolfram,

Thanks for the feedback.

> -----Original Message-----
> From: wsa+renesas <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> Sent: 22 October 2026 10:03
> Subject: Re: [PATCH v24 08/15] mmc: renesas_sdhi: Add TMIO_MMC_INTERNAL_DIVIDER flag
>
> 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?

Agreed. I will update the binding and driver.

Cheers,
Biju