diff options
author | Bitan Biswas <bbiswas@nvidia.com> | 2014-04-09 12:39:17 +0530 |
---|---|---|
committer | Seema Khowala <seemaj@nvidia.com> | 2014-04-23 14:05:00 -0700 |
commit | 52c98f44b4d694654585526b5891ab2762dcddef (patch) | |
tree | a91d091d1412a727393e5dcbc1268b1a540a7c4e /drivers/mmc | |
parent | 16b3b6ba263bdc3ba3fea1c3fb6f9c4c72d452a0 (diff) |
mmc: sdhci: update sdio clock gate timeout
Corrected delayed clock gate timeout expression
for cases where kernel time to switch between
processes is more than 10msec.
bug 1496751
Change-Id: I7fbb670a932b690f521ff1205dce3b81d60a51c2
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/393886
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index d1c132633663..04166083ae91 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -55,8 +55,10 @@ #define MAX_TUNING_LOOP 40 -#define SDIO_CLK_GATING_TICK_TMOUT (HZ / 1000) /* 1msec timeout */ -#define EMMC_CLK_GATING_TICK_TMOUT (HZ / 50) /* 20msec timeout */ +/* SDIO 1msec timeout, but use 10msec timeout for HZ=100 */ +#define SDIO_CLK_GATING_TICK_TMOUT ((HZ >= 1000) ? (HZ / 1000) : 1) +/* 20msec EMMC delayed clock gate timeout */ +#define EMMC_CLK_GATING_TICK_TMOUT ((HZ >= 50) ? (HZ / 50) : 2) #define IS_SDIO_CARD(host) \ (host->mmc->card && \ |