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

Commit c7097a23 authored by Matt Wagantall's avatar Matt Wagantall Committed by Xiaonian Wang
Browse files

mmc: sdhci-msm: Correct usage of readl_poll_timeout() API



The intention of sdhci_msm_probe() was to wait up to 1ms for
CORE_SW_RST to be set, but only a 10us timeout was passed to
readl_poll_timeout().

Correct the timeout value to be 1ms, and decrease the sleep
time between read attempts to only 10us so that it's less
than the expected wait time of 40us.

Change-Id: I7007a68232bfba76409e2dbae3060622fa5c1913
Signed-off-by: default avatarMatt Wagantall <mattw@codeaurora.org>
parent c90fa966
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2830,7 +2830,7 @@ static int sdhci_msm_probe(struct platform_device *pdev)
	 * max. 1ms for reset completion.
	 */
	ret = readl_poll_timeout(msm_host->core_mem + CORE_POWER,
			pwr, !(pwr & CORE_SW_RST), 100, 10);
			pwr, !(pwr & CORE_SW_RST), 10, 1000);

	if (ret) {
		dev_err(&pdev->dev, "reset failed (%d)\n", ret);