diff options
-rw-r--r-- | drivers/mmc/core/core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 4b1d8fb04e9b..6625c057be05 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c | |||
@@ -299,8 +299,9 @@ void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card) | |||
299 | unsigned int timeout_us, limit_us; | 299 | unsigned int timeout_us, limit_us; |
300 | 300 | ||
301 | timeout_us = data->timeout_ns / 1000; | 301 | timeout_us = data->timeout_ns / 1000; |
302 | timeout_us += data->timeout_clks * 1000 / | 302 | if (mmc_host_clk_rate(card->host)) |
303 | (mmc_host_clk_rate(card->host) / 1000); | 303 | timeout_us += data->timeout_clks * 1000 / |
304 | (mmc_host_clk_rate(card->host) / 1000); | ||
304 | 305 | ||
305 | if (data->flags & MMC_DATA_WRITE) | 306 | if (data->flags & MMC_DATA_WRITE) |
306 | /* | 307 | /* |