mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Michael Tretter <m.tretter@pengutronix.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Steffen Trumtrar <s.trumtrar@pengutronix.de>,
	BAREBOX <barebox@lists.infradead.org>
Subject: Re: [PATCH] mci: cadence: fix device tree override of host_caps
Date: Fri, 10 Apr 2026 09:19:16 +0200	[thread overview]
Message-ID: <68ee1a91-eb84-4739-bf54-464b35834768@pengutronix.de> (raw)
In-Reply-To: <20260409-socfpga-agilex5-sdhci-v1-1-d1753ac5defa@pengutronix.de>

On 4/9/26 4:15 PM, Michael Tretter wrote:
> The host_caps setting in the device tree shall override the default
> host_caps set by the driver to allow board specific overrides.
> 
> Move the configuration of the driver default host_caps before the call
> to mci_of_parse().
> 
> mci_of_parse() still has to be called in the middle of the mci
> configuration, because f_max may be set in the device tree, but is used
> to calculate f_min.
> 
> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> ---
>  drivers/mci/cadence-sdhci.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mci/cadence-sdhci.c b/drivers/mci/cadence-sdhci.c
> index ccd0f36cb033..b76c04f5e087 100644
> --- a/drivers/mci/cadence-sdhci.c
> +++ b/drivers/mci/cadence-sdhci.c
> @@ -471,13 +471,14 @@ static int sdhci_cdns_probe(struct device *dev)
>  
>  	dev->priv = priv;
>  
> +	priv->mci.voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
> +	priv->mci.host_caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA;
> +	priv->mci.host_caps |= MMC_CAP_MMC_HIGHSPEED_52MHZ;
> +
>  	priv->mci.f_max = clk_get_rate(priv->biu_clk);
>  	mci_of_parse(mci);
>  	priv->mci.f_min = priv->mci.f_max / SDHCI_MAX_DIV_SPEC_300;
>  
> -	priv->mci.voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
> -	priv->mci.host_caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA;
> -	priv->mci.host_caps |= MMC_CAP_MMC_HIGHSPEED_52MHZ;
>  	if (is_sd4hc) {
>  		ret = sdhci_cdns4_phy_probe(dev, priv);
>  	} else {
> 
> ---
> base-commit: 86269eff785a915cfb96f09d9c7ec81a89d33012
> change-id: 20260409-socfpga-agilex5-sdhci-d4179764d02f
> 
> Best regards,

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |




  reply	other threads:[~2026-04-10  7:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-09 14:15 Michael Tretter
2026-04-10  7:19 ` Ahmad Fatoum [this message]
2026-04-13  7:03 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=68ee1a91-eb84-4739-bf54-464b35834768@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=m.tretter@pengutronix.de \
    --cc=s.hauer@pengutronix.de \
    --cc=s.trumtrar@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox