From 28f9d7aa7bca7c18aa41149d82c7b7398e483b9c Mon Sep 17 00:00:00 2001 From: Matt Wagantall Date: Tue, 29 Apr 2014 15:48:15 -0700 Subject: [PATCH] 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: Matt Wagantall --- drivers/mmc/host/sdhci-msm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index bcb637263a1f..55001192434c 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -2826,7 +2826,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);