RE: [PATCH v24 07/15] mmc: renesas_sdhi: Add tuning delay support for RZ/G2L
From: Biju Das
Date: Fri Sep 04 2026 - 11:30:06 EST
Hi Wolfram,
> -----Original Message-----
> From: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> Sent: 03 September 2026 10:34
> Subject: Re: [PATCH v24 07/15] mmc: renesas_sdhi: Add tuning delay support for RZ/G2L
>
>
> This might be over-engineering a bit, but let's discuss:
Ok
>
> > +static void renesas_sdhi_set_hw_adjustment_delay(struct tmio_mmc_host
> > +*host)
>
> How about adding a 'bool force_clear' parameter here...
Ok.
>
> > +{
> > + struct renesas_sdhi *priv = host_to_priv(host);
> > +
> > + if (!(host->pdata->flags & TMIO_MMC_TUNING_DELAY))
> > + return;
> > +
> > + if (host->mmc->ios.signal_voltage == MMC_SIGNAL_VOLTAGE_330)
>
> add '|| force_clear' here ...
Ok.
>
> > + sd_scc_write32(host, priv, SH_MOBILE_SDHI_SCC_TMPPORT2, 0x0);
> > + else
> > + sd_scc_write32(host, priv, SH_MOBILE_SDHI_SCC_TMPPORT2, 0x1); }
>
> ...
>
> > + if ((host->pdata->flags & TMIO_MMC_TUNING_DELAY) && priv->tap_num == 8)
> > + sd_scc_write32(host, priv, SH_MOBILE_SDHI_SCC_TMPPORT2, 0);
>
> and simplify this to
>
> /* add comment why on tap_num == 8 */
> if (priv->tap_num == 8)
> renesas_sdhi_set_hw_adjustment_delay(host, true);
Ok.
>
> ?
>
> The other call to renesas_sdhi_set_hw_adjustment_delay needs the bool parameter 'false' then, of course.
>
> What do you think? Rest looks good.
I agree, it simplifies the code.
Cheers,
Biju