diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2011-06-23 06:40:27 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-06-25 18:52:53 -0400 |
commit | 4cf8c6dd2e261da94b87c4deadcc136ab022b6ac (patch) | |
tree | 5bad08b6490c694b60d8c4afc0ab638ccea838ff /drivers/mmc | |
parent | ddd6fa7e794e62af3ec3eb4ffdc78489885701f2 (diff) |
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>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/core.c | 2 |
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, | |||
1245 | */ | 1245 | */ |
1246 | timeout_clks <<= 1; | 1246 | timeout_clks <<= 1; |
1247 | timeout_us += (timeout_clks * 1000) / | 1247 | timeout_us += (timeout_clks * 1000) / |
1248 | (card->host->ios.clock / 1000); | 1248 | (mmc_host_clk_rate(card->host) / 1000); |
1249 | 1249 | ||
1250 | erase_timeout = timeout_us / 1000; | 1250 | erase_timeout = timeout_us / 1000; |
1251 | 1251 | ||