Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262974
b: refs/heads/master
c: 83cbcd9
h: refs/heads/master
v: v3
  • Loading branch information
Andy Shevchenko authored and Chris Ball committed Aug 13, 2011
1 parent 6a8f17e commit 88bc21e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4906baf080623b4971bdeeac0a9fec5b8885d3ac
refs/heads/master: 83cbcd93a1be803ccda53e7acbdc9a937c8f6375
7 changes: 3 additions & 4 deletions trunk/drivers/mmc/host/sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,6 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd)
target_timeout = data->timeout_ns / 1000 +
data->timeout_clks / host->clock;

if (host->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK)
host->timeout_clk = host->clock / 1000;

/*
* Figure out needed cycles.
* We do this in steps in order to fit inside a 32 bit int.
Expand All @@ -645,7 +642,6 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd)
* =>
* (1) / (2) > 2^6
*/
BUG_ON(!host->timeout_clk);
count = 0;
current_timeout = (1 << 13) * 1000 / host->timeout_clk;
while (current_timeout < target_timeout) {
Expand Down Expand Up @@ -2474,6 +2470,9 @@ int sdhci_add_host(struct sdhci_host *host)
if (caps[0] & SDHCI_TIMEOUT_CLK_UNIT)
host->timeout_clk *= 1000;

if (host->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK)
host->timeout_clk = host->clock / 1000;

/*
* In case of Host Controller v3.00, find out whether clock
* multiplier is supported.
Expand Down

0 comments on commit 88bc21e

Please sign in to comment.