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

Commit 6330bb32 authored by Venkat Gopalakrishnan's avatar Venkat Gopalakrishnan
Browse files

mmc: sdhci: Fix unclocked register access



During platform driver probe we call mmc_start_host in sdhci_add_host,
which could start the mmc_rescan work immediately and trigger a runtime
suspend. This creates a race condition where the clocks could be turned off
even before the probe has completed leading to unclocked register access.

CRs-Fixed: 770843
Change-Id: I77ae36f805e496d56ed96db3ccaa83f2c37c926c
Signed-off-by: default avatarVenkat Gopalakrishnan <venkatg@codeaurora.org>
parent 0dab3364
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -4183,8 +4183,6 @@ int sdhci_add_host(struct sdhci_host *host)
					mmc_hostname(mmc), ret);
	}

	mmc_add_host(mmc);

	if (host->quirks2 & SDHCI_QUIRK2_IGN_DATA_END_BIT_ERROR) {
		host->ier = (host->ier & ~SDHCI_INT_DATA_END_BIT);
		sdhci_writel(host, host->ier, SDHCI_INT_ENABLE);
@@ -4212,6 +4210,7 @@ int sdhci_add_host(struct sdhci_host *host)

	sdhci_enable_card_detection(host);

	mmc_add_host(mmc);
	return 0;

#ifdef SDHCI_USE_LEDS_CLASS