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

Commit 0ebb3ca3 authored by Veerabhadrarao Badiganti's avatar Veerabhadrarao Badiganti Committed by Gerrit - the friendly Code Review server
Browse files

mmc: host: msm: Don't check for core-dll lock during hs400es dll init



When initializing DLL in HS400 enhanced strobe-mode, no need to wait
for core dll lock. So skip this wait-on-lock step for hs400es in dll
init sequence.

Change-Id: I8cda0244cb5a397824c613a3c667470cd23e7288
Signed-off-by: default avatarVeerabhadrarao Badiganti <vbadigan@codeaurora.org>
Signed-off-by: default avatarRam Prakash Gupta <rampraka@codeaurora.org>
parent a412fecd
Loading
Loading
Loading
Loading
+26 −13
Original line number Diff line number Diff line
@@ -865,6 +865,9 @@ static int msm_init_cm_dll(struct sdhci_host *host,
			| CORE_CK_OUT_EN), host->ioaddr +
			msm_host_offset->CORE_DLL_CONFIG);

	/* For hs400es mode, no need to wait for core dll lock */
	if (!(msm_host->enhanced_strobe &&
				mmc_card_strobe(msm_host->mmc->card))) {
		wait_cnt = 50;
		/* Wait until DLL_LOCK bit of DLL_STATUS register becomes '1' */
		while (!(readl_relaxed(host->ioaddr +
@@ -879,6 +882,7 @@ static int msm_init_cm_dll(struct sdhci_host *host,
			/* wait for 1us before polling again */
			udelay(1);
		}
	}

out:
	/* Restore the correct PWRSAVE state */
@@ -3759,11 +3763,20 @@ static void sdhci_msm_set_clock(struct sdhci_host *host, unsigned int clock)
			 * Poll on DLL_LOCK and DDR_DLL_LOCK bits in
			 * CORE_DLL_STATUS to be set.  This should get set
			 * with in 15 us at 200 MHz.
			 * No need to check for DLL lock for HS400es mode
			 */
			if (card && mmc_card_strobe(card) &&
						msm_host->enhanced_strobe) {
				rc = readl_poll_timeout(host->ioaddr +
					msm_host_offset->CORE_DLL_STATUS,
					dll_lock, (dll_lock &
					CORE_DDR_DLL_LOCK), 10, 1000);
			} else {
				rc = readl_poll_timeout(host->ioaddr +
					msm_host_offset->CORE_DLL_STATUS,
					dll_lock, (dll_lock & (CORE_DLL_LOCK |
					CORE_DDR_DLL_LOCK)), 10, 1000);
			}
			if (rc == -ETIMEDOUT)
				pr_err("%s: Unable to get DLL_LOCK/DDR_DLL_LOCK, dll_status: 0x%08x\n",
						mmc_hostname(host->mmc),