summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTanmay Kathpalia <[email protected]>2025-12-03 04:21:31 -0800
committerPeng Fan <[email protected]>2025-12-11 20:53:50 +0800
commitb033255a5795cc2d88f761c856d6e8e354267582 (patch)
tree4d075c8230264764006a8e5cdf7a476c56637913 /drivers
parent66be03b7ee19444b23aae3990a434a7470fc1641 (diff)
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 <[email protected]> Reviewed-by: Balsundar Ponnusamy <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/sdhci-cadence.c6
1 files changed, 6 insertions, 0 deletions
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 <linux/sizes.h>
#include <linux/libfdt.h>
#include <mmc.h>
+#include <reset.h>
#include <sdhci.h>
#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;