From 8bb24b5c4d41fdbaa7363dd383d4b7d9a5bfb61a Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Wed, 3 Aug 2011 18:35:59 +0300 Subject: [PATCH] --- yaml --- r: 262975 b: refs/heads/master c: 78a2ca2727a9b992901c715bc881b6ddb4ec6a4e h: refs/heads/master i: 262973: 6a8f17e57f9c75dac1d596b7e65718197cb86cf0 262971: 5c6b1c1def22c360b0c323cf2b343b251569feea 262967: 656a1505bb81fb9a653926c47b2630acdf640544 262959: 86bd7460a6a6a248631c612785f62d122383bc9f 262943: 0f5cb8610d9115da28c2a543eaeb8d0139ae3bf2 262911: 174b992803edc239a54507375a44650791a28383 v: v3 --- [refs] | 2 +- trunk/drivers/mmc/host/sdhci.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index d91316e34931..a763cd17a9d0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 83cbcd93a1be803ccda53e7acbdc9a937c8f6375 +refs/heads/master: 78a2ca2727a9b992901c715bc881b6ddb4ec6a4e diff --git a/trunk/drivers/mmc/host/sdhci.c b/trunk/drivers/mmc/host/sdhci.c index 11d031b8708c..89ba4516cb8c 100644 --- a/trunk/drivers/mmc/host/sdhci.c +++ b/trunk/drivers/mmc/host/sdhci.c @@ -628,9 +628,11 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd) /* timeout in us */ if (!data) target_timeout = cmd->cmd_timeout_ms * 1000; - else - target_timeout = data->timeout_ns / 1000 + - data->timeout_clks / host->clock; + else { + target_timeout = data->timeout_ns / 1000; + if (host->clock) + target_timeout += data->timeout_clks / host->clock; + } /* * Figure out needed cycles.