diff options
author | Pavan Kunapuli <pkunapuli@nvidia.com> | 2013-10-24 19:03:45 +0530 |
---|---|---|
committer | Harry Hong <hhong@nvidia.com> | 2013-12-08 16:37:13 -0800 |
commit | 1753207a0133dd0839d73ec96a45d6a7c46a6003 (patch) | |
tree | 8b35f8282cbe76b5b62a86b9272236dc7c2ec8ec /include | |
parent | cb2ae3ffb426802a46ce928024a52ab0ec3a6392 (diff) |
mmc: host: sdhci: delayed clock gate support
Aggressive clock gate degrades sdhci performance.
Hence, sdhci clock gate is delayed.
- sdhci clock gate is done if no further
transaction starts within 20msec interval
- delayed clock gate only supported for EMMC
in this patch
- switch is set as delayed clock gate off
bug 1372006
Change-Id: I9672cbd643dfb45192062dc827275daacc813cc5
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/335081
(cherry picked from commit 378d42be0224ed9f57c77ee57997786c5e8e218f)
Reviewed-on: http://git-master/r/339098
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mmc/sdhci.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index 148ec670ea3c..689ceb041554 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h @@ -102,6 +102,8 @@ struct sdhci_host { #define SDHCI_QUIRK2_NO_CALC_MAX_DISCARD_TO (1<<4) /* Controller needs a dummy write after INT_CLK_EN for clock to be stable */ #define SDHCI_QUIRK2_INT_CLK_STABLE_REQ_DUMMY_REG_WRITE (1<<5) +/* sdio delayed clock gate */ +#define SDHCI_QUIRK2_DELAYED_CLK_GATE (1<<6) int irq; /* Device IRQ */ void __iomem *ioaddr; /* Mapped address */ @@ -187,7 +189,14 @@ struct sdhci_host { unsigned int edp_states[SD_EDP_NUM_STATES]; bool edp_support; + struct delayed_work delayed_clk_gate_wrk; + bool is_clk_on; + unsigned long private[0] ____cacheline_aligned; }; + +/* callback is registered during init */ +void delayed_clk_gate_cb(struct work_struct *work); + #endif /* LINUX_MMC_SDHCI_H */ |