[PATCH 15/22] mci: sdhci: wait for idle before stopping clock

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

 



We should wait for the controller being idle before stopping the clock.
Some SDHCI controllers like the one found on TI AM62x SoCs do not work
properly without it.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 drivers/mci/sdhci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mci/sdhci.c b/drivers/mci/sdhci.c
index 8c543c1b5b..6d3c695372 100644
--- a/drivers/mci/sdhci.c
+++ b/drivers/mci/sdhci.c
@@ -493,6 +493,8 @@ void sdhci_set_clock(struct sdhci *host, unsigned int clock, unsigned int input_
 
 	host->mci->clock = 0;
 
+	sdhci_wait_idle(host, NULL);
+
 	sdhci_write16(host, SDHCI_CLOCK_CONTROL, 0);
 
 	if (clock == 0)
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux