msm: msm_sdcc: Set default clock gating timeout to 200msecs
With commit c84f15ae, the default clock gating delay in mmc host
init is set to zero. For MSM targets this can cause huge
performance hit as sometimes the clocks are non-local and
requires a request to other subsystem leading to significant
roundtrip delay.
Fix this to have atleast 200msecs delay in turning off the sdcc
clocks after a request is completed.
Change-Id: I5f434cf98373154d817735dba8f5bc8810d27611
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
This commit is contained in:
committed by
Stephen Boyd
parent
b813b9eafb
commit
3de43b3e2a
@@ -4940,9 +4940,10 @@ msmsdcc_probe(struct platform_device *pdev)
|
|||||||
mmc->f_min = msmsdcc_get_min_sup_clk_rate(host);
|
mmc->f_min = msmsdcc_get_min_sup_clk_rate(host);
|
||||||
mmc->f_max = msmsdcc_get_max_sup_clk_rate(host);
|
mmc->f_max = msmsdcc_get_max_sup_clk_rate(host);
|
||||||
mmc->ocr_avail = plat->ocr_mask;
|
mmc->ocr_avail = plat->ocr_mask;
|
||||||
|
mmc->clkgate_delay = MSM_MMC_CLK_GATE_DELAY;
|
||||||
|
|
||||||
mmc->pm_caps |= MMC_PM_KEEP_POWER | MMC_PM_WAKE_SDIO_IRQ;
|
mmc->pm_caps |= MMC_PM_KEEP_POWER | MMC_PM_WAKE_SDIO_IRQ;
|
||||||
mmc->caps |= plat->mmc_bus_width;
|
mmc->caps |= plat->mmc_bus_width;
|
||||||
|
|
||||||
mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED;
|
mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED;
|
||||||
mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY | MMC_CAP_ERASE;
|
mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY | MMC_CAP_ERASE;
|
||||||
|
|
||||||
|
|||||||
@@ -212,10 +212,10 @@
|
|||||||
#define NR_SG 128
|
#define NR_SG 128
|
||||||
|
|
||||||
#define MSM_MMC_IDLE_TIMEOUT 5000 /* msecs */
|
#define MSM_MMC_IDLE_TIMEOUT 5000 /* msecs */
|
||||||
|
#define MSM_MMC_CLK_GATE_DELAY 200 /* msecs */
|
||||||
|
|
||||||
/* Set the request timeout to 10secs */
|
/* Set the request timeout to 10secs */
|
||||||
#define MSM_MMC_REQ_TIMEOUT 10000 /* msecs */
|
#define MSM_MMC_REQ_TIMEOUT 10000 /* msecs */
|
||||||
#define MSM_MMC_DISABLE_TIMEOUT 200 /* msecs */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Controller HW limitations
|
* Controller HW limitations
|
||||||
|
|||||||
@@ -251,7 +251,6 @@ struct mmc_host {
|
|||||||
|
|
||||||
mmc_pm_flag_t pm_caps; /* supported pm features */
|
mmc_pm_flag_t pm_caps; /* supported pm features */
|
||||||
|
|
||||||
#ifdef CONFIG_MMC_CLKGATE
|
|
||||||
int clk_requests; /* internal reference counter */
|
int clk_requests; /* internal reference counter */
|
||||||
unsigned int clk_delay; /* number of MCI clk hold cycles */
|
unsigned int clk_delay; /* number of MCI clk hold cycles */
|
||||||
bool clk_gated; /* clock gated */
|
bool clk_gated; /* clock gated */
|
||||||
@@ -261,7 +260,6 @@ struct mmc_host {
|
|||||||
struct mutex clk_gate_mutex; /* mutex for clock gating */
|
struct mutex clk_gate_mutex; /* mutex for clock gating */
|
||||||
struct device_attribute clkgate_delay_attr;
|
struct device_attribute clkgate_delay_attr;
|
||||||
unsigned long clkgate_delay;
|
unsigned long clkgate_delay;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* host specific block data */
|
/* host specific block data */
|
||||||
unsigned int max_seg_size; /* see blk_queue_max_segment_size */
|
unsigned int max_seg_size; /* see blk_queue_max_segment_size */
|
||||||
|
|||||||
Reference in New Issue
Block a user