From: Tanmay Kathpalia Date: Wed, 3 Dec 2025 12:21:31 +0000 (-0800) Subject: mmc: sdhci-cadence: Add reset control support X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b033255a5795cc2d88f761c856d6e8e354267582;p=thirdparty%2Fu-boot.git mmc: sdhci-cadence: Add reset control support Add reset control functionality to the SDHCI Cadence driver to properly handle hardware reset sequences during probe. This ensures the controller is in a known state before initialization. Signed-off-by: Tanmay Kathpalia Reviewed-by: Balsundar Ponnusamy Reviewed-by: Peng Fan Signed-off-by: Peng Fan --- diff --git a/drivers/mmc/sdhci-cadence.c b/drivers/mmc/sdhci-cadence.c index 7d169efa476..6c9d24fe5f7 100644 --- a/drivers/mmc/sdhci-cadence.c +++ b/drivers/mmc/sdhci-cadence.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include "sdhci-cadence.h" @@ -214,6 +215,7 @@ static int sdhci_cdns_probe(struct udevice *dev) struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev); struct sdhci_cdns_plat *plat = dev_get_plat(dev); struct sdhci_host *host = dev_get_priv(dev); + struct reset_ctl_bulk reset_bulk; fdt_addr_t base; int ret; @@ -225,6 +227,10 @@ static int sdhci_cdns_probe(struct udevice *dev) if (!plat->hrs_addr) return -ENOMEM; + ret = reset_get_bulk(dev, &reset_bulk); + if (!ret) + reset_deassert_bulk(&reset_bulk); + host->name = dev->name; host->ioaddr = plat->hrs_addr + SDHCI_CDNS_SRS_BASE; host->ops = &sdhci_cdns_ops;