From: Barry Song <baohua.s...@csr.com>

now we wait 1ms after every loop, in the worst case, 1ms will be wasted.
that both decreases sd performance and increases cpu usage.
This patch shorten the interval to 1us, then in the worst case, only 1us
is wasted.

Signed-off-by: Barry Song <baohua.s...@csr.com>
---
 drivers/mmc/host/sdhci.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 0e02cc1..13bcb96 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -935,8 +935,8 @@ static void sdhci_send_command(struct sdhci_host *host, 
struct mmc_command *cmd)
 
        WARN_ON(host->cmd);
 
-       /* Wait max 10 ms */
-       timeout = 10;
+       /* Wait max 10000 us */
+       timeout = 10000;
 
        mask = SDHCI_CMD_INHIBIT;
        if ((cmd->data != NULL) || (cmd->flags & MMC_RSP_BUSY))
@@ -957,7 +957,7 @@ static void sdhci_send_command(struct sdhci_host *host, 
struct mmc_command *cmd)
                        return;
                }
                timeout--;
-               mdelay(1);
+               udelay(1);
        }
 
        mod_timer(&host->timer, jiffies + 10 * HZ);
-- 
1.7.1



Member of the CSR plc group of companies. CSR plc registered in England and 
Wales, registered number 4187346, registered office Churchill House, Cambridge 
Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at 
http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to