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 <tanmay.kathpalia@altera.com> Reviewed-by: Balsundar Ponnusamy <balsundar.ponnusamy@altera.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
committed by
Peng Fan
parent
66be03b7ee
commit
b033255a57
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user