Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e46bcd42 authored by Sujit Reddy Thumma's avatar Sujit Reddy Thumma
Browse files

mmc: sdhci: Fix possible spec. violation during voltage switch sequence



With commit 0797e5f1 (mmc: core: Fixup signal voltage switch), voltage
switch sequence for UHS-I cards is broken if used with sdhci driver.
The commit expects the SD clock to be disabled when mmc_set_ios() is
issued but sdhci_do_set_ios() re-enables the SD clock for few cycles
after disabling which is a specification violation during voltage
switch sequence. This failure is observed only for a small group of
cards where they ultimately fall-back into high-speed mode even if
UHS-I modes are supported.

Change-Id: Ie275326627a84bfcd4352637a043296c01c175a6
Signed-off-by: default avatarSujit Reddy Thumma <sthumma@codeaurora.org>
parent 5f4d31f2
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1944,6 +1944,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios)
			sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);

			/* Re-enable SD Clock */
			if (ios->clock)
				flags = sdhci_update_clock(host, flags);
		}

@@ -1990,6 +1991,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios)
		}

		/* Re-enable SD Clock */
		if (ios->clock)
			flags = sdhci_update_clock(host, flags);
	} else
		sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);