History

mmc: sdhci: use f_max instead of host->clock for timeouts

When timeout_clk is calculated the host->clock could be zero. So, instead of host->clock the calculation now uses mmc->f_max.

Andy Shevchenko committed 15 years ago

Commit 65be3fe1 parent 272308c1 file · +2 −5Browse files

Unified · Split

drivers/mmc/host/sdhci.c+2−5
@@ -2505,12 +2505,9 @@ int sdhci_add_host(struct sdhci_host *host) · 2504 unmodified lines
25052505 host->timeout_clk *= 1000;
25062506
25072507 if (host->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK)
2508− host->timeout_clk = host->clock / 1000;
2508+ host->timeout_clk = mmc->f_max / 1000;
25092509
2510− if (host->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK)
2511− mmc->max_discard_to = (1 << 27) / (mmc->f_max / 1000);
2512− else
2513− mmc->max_discard_to = (1 << 27) / host->timeout_clk;
2510+ mmc->max_discard_to = (1 << 27) / host->timeout_clk;
25142511
25152512 mmc->caps |= MMC_CAP_SDIO_IRQ | MMC_CAP_ERASE | MMC_CAP_CMD23;
25162513

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t