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

Commit 27d29e2b authored by Sayali Lokhande's avatar Sayali Lokhande Committed by Xiaonian Wang
Browse files

mmc: host: Add check for post tuning in HS400



'commit 34e4cf13f729 ("mmc: core: Update HS400 timing
mode before performing tuning")' updates timing mode
to HS400 before tuning in mmc_hs200_tuning.
On 4.4 kernel, there is check added to bail out from
execute_tuning if HS400 tuning is done in HS200 mode.

Adding check to avoid bailing out and allow
execute_tuning if POST_TUNING capability is set.

Change-Id: I259da28050e5da0c96251cb99176386927b596f0
Signed-off-by: default avatarSayali Lokhande <sayalil@codeaurora.org>
parent 9150a94a
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -2371,9 +2371,10 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
	switch (host->timing) {
	/* HS400 tuning is done in HS200 mode */
	case MMC_TIMING_MMC_HS400:
		if (!(mmc->caps2 & MMC_CAP2_HS400_POST_TUNING)) {
			err = -EINVAL;
			goto out_unlock;

		}
	case MMC_TIMING_MMC_HS200:
		/*
		 * Periodic re-tuning for HS400 is not expected to be needed, so