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

Commit badab85f authored by Ram Prakash Gupta's avatar Ram Prakash Gupta
Browse files

mmc: core: Use mmc_reset instead of power_restore



Disable and enable clk scaling before and after init card.

Change-Id: Ib6b637c3ed83807d0c3f2d332ce3eaf5c2b2b811
Signed-off-by: default avatarRam Prakash Gupta <rampraka@codeaurora.org>
parent c33d0b2f
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -2748,6 +2748,13 @@ static int _mmc_hw_reset(struct mmc_host *host)
		mmc_pwrseq_reset(host);
	}

	/* Suspend clk scaling to avoid switching frequencies intermittently */
	ret = mmc_suspend_clk_scaling(host);
	if (ret) {
		pr_err("%s: %s: fail to suspend clock scaling (%d)\n",
				mmc_hostname(host), __func__, ret);
		return ret;
	}
	ret = mmc_init_card(host, host->card->ocr, host->card);
	if (ret) {
		pr_err("%s: %s: mmc_init_card failed (%d)\n",
@@ -2755,6 +2762,11 @@ static int _mmc_hw_reset(struct mmc_host *host)
		return ret;
	}

	ret = mmc_suspend_clk_scaling(host);
	if (ret) {
		pr_err("%s: %s: fail to suspend clock scaling (%d)\n",
				mmc_hostname(host), __func__, ret);
	}
	return ret;
}