[PATCH 1/3] mmc: mmci: De-assert reset on probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If we find a reset handle when probing the MMCI block,
make sure the reset is de-asserted. It could happen that
a hardware has reset asserted at boot.

Cc: Russell King <linux@xxxxxxxxxxxxxxx>
Cc: Yann Gautier <yann.gautier@xxxxxxxxxxx>
Cc: Ludovic Barre <ludovic.barre@xxxxxx>
Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
---
 drivers/mmc/host/mmci.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 984d35055156..af2ed6013ef9 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -2125,6 +2125,10 @@ static int mmci_probe(struct amba_device *dev,
 	if (IS_ERR(host->rst)) {
 		ret = PTR_ERR(host->rst);
 		goto clk_disable;
+	} else {
+		ret = reset_control_deassert(host->rst);
+		if (ret)
+			dev_err(mmc_dev(mmc), "failed to de-assert reset\n");
 	}
 
 	/* Get regulators and the supported OCR mask */
-- 
2.31.1




[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux