mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-26 02:25:00 -05:00
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>
This commit is contained in:
parent
ddd6fa7e79
commit
4cf8c6dd2e
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue