Skip to contentSkip to conversation

rockchip: sdhci: Fix sdhci mmc driver probe abort

PATCH New Kever Yang 2 participants 3 messages Jul 19, 2019 – Jul 23, 2019

Subsystems (2)
lore
Share & tools
lore

Kever Yang

author
#0 lore raw

PATCH 1/1 rockchip: sdhci: Fix sdhci mmc driver probe abort

This patch fix mmc driver abort caused by below patch:
3d296365e4 mmc: sdhci: Add support for sdhci-caps-mask

After the patch sdhci_setup_cfg() access to host->mmc->dev, so we have to do init before make the call to the function()

---

 drivers/mmc/rockchip_sdhci.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/mmc/rockchip_sdhci.c +4 -4
index cb623d589b..dd3d5574db 100644
@@ -68,15 +68,15 @@ static int arasan_sdhci_probe(struct udevice *dev)
 	if (host->bus_width == 8)
 		host->host_caps |= MMC_MODE_8BIT;
 
-	ret = sdhci_setup_cfg(&plat->cfg, host, 0, EMMC_MIN_FREQ);
-
 	host->mmc = &plat->mmc;
-	if (ret)
-		return ret;
 	host->mmc->priv = &prv->host;
 	host->mmc->dev = dev;
 	upriv->mmc = host->mmc;
 
+	ret = sdhci_setup_cfg(&plat->cfg, host, 0, EMMC_MIN_FREQ);
+	if (ret)
+		return ret;
+
 	return sdhci_probe(dev);
 }
 
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 rockchip: sdhci: Fix sdhci mmc driver probe abort

Quoted 9 lines · Kever Yang

This patch fix mmc driver abort caused by below patch:
3d296365e4 mmc: sdhci: Add support for sdhci-caps-mask

After the patch sdhci_setup_cfg() access to host->mmc->dev, so we have to do init before make the call to the function()

---

NanoPi-NE04/M4, NanoPC-T4, OrangePI

author
#2 lore raw

PATCH 1/1 rockchip: sdhci: Fix sdhci mmc driver probe abort

Quoted 4 lines · Jagan Teki
Quoted 3 lines · Kever Yang

This patch fix mmc driver abort caused by below patch:
3d296365e4 mmc: sdhci: Add support for sdhci-caps-mask

Quoted 8 lines
Quoted 5 lines

After the patch sdhci_setup_cfg() access to host->mmc->dev, so we have to do init before make the call to the function()

---

NanoPi-NE04/M4, NanoPC-T4, OrangePI

Applied to u-boot-rockchip, thanks!