[PATCH] mci: cadence: fix device tree override of host_caps
Michael Tretter
m.tretter at pengutronix.de
Thu Apr 9 07:15:09 PDT 2026
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 at 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,
--
Michael Tretter <m.tretter at pengutronix.de>
More information about the barebox
mailing list