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

Commit 235e3d78 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: sdhci-msm: Correct the CDR toggle logic"

parents 8f17d7b6 29d92826
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -2372,14 +2372,18 @@ static void sdhci_msm_check_power_status(struct sdhci_host *host, u32 req_type)

static void sdhci_msm_toggle_cdr(struct sdhci_host *host, bool enable)
{
	if (enable)
		writel_relaxed((readl_relaxed(host->ioaddr +
					      CORE_DLL_CONFIG) | CORE_CDR_EN),
			       host->ioaddr + CORE_DLL_CONFIG);
	else
		writel_relaxed((readl_relaxed(host->ioaddr +
					      CORE_DLL_CONFIG) & ~CORE_CDR_EN),
			       host->ioaddr + CORE_DLL_CONFIG);
	u32 config;
	config = readl_relaxed(host->ioaddr + CORE_DLL_CONFIG);

	if (enable) {
		config |= CORE_CDR_EN;
		config &= ~CORE_CDR_EXT_EN;
		writel_relaxed(config, host->ioaddr + CORE_DLL_CONFIG);
	} else {
		config &= ~CORE_CDR_EN;
		config |= CORE_CDR_EXT_EN;
		writel_relaxed(config, host->ioaddr + CORE_DLL_CONFIG);
	}
}

static unsigned int sdhci_msm_max_segs(void)