summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2011-06-23 14:40:27 +0400
committerChris Ball <cjb@laptop.org>2011-06-26 02:52:53 +0400
commit4cf8c6dd2e261da94b87c4deadcc136ab022b6ac (patch)
tree5bad08b6490c694b60d8c4afc0ab638ccea838ff
parentddd6fa7e794e62af3ec3eb4ffdc78489885701f2 (diff)
downloadlinux-4cf8c6dd2e261da94b87c4deadcc136ab022b6ac.tar.xz
mmc: core: make erase timeout calculation allow for gated clock
The erase timeout calculation may depend on clock rate which is zero if the clock is gated, so use mmc_host_clk_rate() which allows for that case. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r--drivers/mmc/core/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 68091dda3f31..7843efe22359 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1245,7 +1245,7 @@ static unsigned int mmc_mmc_erase_timeout(struct mmc_card *card,
*/
timeout_clks <<= 1;
timeout_us += (timeout_clks * 1000) /
- (card->host->ios.clock / 1000);
+ (mmc_host_clk_rate(card->host) / 1000);
erase_timeout = timeout_us / 1000;