diff options
| -rw-r--r-- | drivers/mmc/host/sdhci.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 262985a1a952..11d031b8708c 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
| @@ -632,9 +632,6 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd) | |||
| 632 | target_timeout = data->timeout_ns / 1000 + | 632 | target_timeout = data->timeout_ns / 1000 + |
| 633 | data->timeout_clks / host->clock; | 633 | data->timeout_clks / host->clock; |
| 634 | 634 | ||
| 635 | if (host->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK) | ||
| 636 | host->timeout_clk = host->clock / 1000; | ||
| 637 | |||
| 638 | /* | 635 | /* |
| 639 | * Figure out needed cycles. | 636 | * Figure out needed cycles. |
| 640 | * We do this in steps in order to fit inside a 32 bit int. | 637 | * We do this in steps in order to fit inside a 32 bit int. |
| @@ -645,7 +642,6 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd) | |||
| 645 | * => | 642 | * => |
| 646 | * (1) / (2) > 2^6 | 643 | * (1) / (2) > 2^6 |
| 647 | */ | 644 | */ |
| 648 | BUG_ON(!host->timeout_clk); | ||
| 649 | count = 0; | 645 | count = 0; |
| 650 | current_timeout = (1 << 13) * 1000 / host->timeout_clk; | 646 | current_timeout = (1 << 13) * 1000 / host->timeout_clk; |
| 651 | while (current_timeout < target_timeout) { | 647 | while (current_timeout < target_timeout) { |
| @@ -2474,6 +2470,9 @@ int sdhci_add_host(struct sdhci_host *host) | |||
| 2474 | if (caps[0] & SDHCI_TIMEOUT_CLK_UNIT) | 2470 | if (caps[0] & SDHCI_TIMEOUT_CLK_UNIT) |
| 2475 | host->timeout_clk *= 1000; | 2471 | host->timeout_clk *= 1000; |
| 2476 | 2472 | ||
| 2473 | if (host->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK) | ||
| 2474 | host->timeout_clk = host->clock / 1000; | ||
| 2475 | |||
| 2477 | /* | 2476 | /* |
| 2478 | * In case of Host Controller v3.00, find out whether clock | 2477 | * In case of Host Controller v3.00, find out whether clock |
| 2479 | * multiplier is supported. | 2478 | * multiplier is supported. |
