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
2505 host->timeout_clk *= 1000;2505 host->timeout_clk *= 1000;
2506 2506
2507 if (host->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK)2507 if (host->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK)
2508 host->timeout_clk = host->clock / 1000;2508 host->timeout_clk = mmc->f_max / 1000;
2509 2509
2510 if (host->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK)2510 mmc->max_discard_to = (1 << 27) / host->timeout_clk;
2511 mmc->max_discard_to = (1 << 27) / (mmc->f_max / 1000);
2512 else
2513 mmc->max_discard_to = (1 << 27) / host->timeout_clk;
2514 2511
2515 mmc->caps |= MMC_CAP_SDIO_IRQ | MMC_CAP_ERASE | MMC_CAP_CMD23;2512 mmc->caps |= MMC_CAP_SDIO_IRQ | MMC_CAP_ERASE | MMC_CAP_CMD23;
2516 2513

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