]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
mmc: core: fix regression: set default clock gating delay to 0
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Thu, 23 Feb 2012 10:22:29 +0000 (11:22 +0100)
committerChris Ball <cjb@laptop.org>
Sun, 4 Mar 2012 17:18:40 +0000 (12:18 -0500)
A recent commit "mmc: core: Use delayed work in clock gating framework"
(597dd9d79cfbbb1) introduced a default 200ms delay before clock gating
actually takes place.  This means that every time an MMC interface
becomes idle it first stays on for 200ms before gating its clock. This
leads to increased power consumption and is therefore a clear regression.
This patch restores the original behaviour by setting the default delay
to 0. Users prioritising throughput over power efficiency can still
modify the delay via sysfs.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/core/host.c

index 30055f2b0d445b3e0c08ed131f939146fef68626..c3704e293a7b30d52c9cc1893da88a0e4844131b 100644 (file)
@@ -238,10 +238,10 @@ static inline void mmc_host_clk_init(struct mmc_host *host)
        /* Hold MCI clock for 8 cycles by default */
        host->clk_delay = 8;
        /*
-        * Default clock gating delay is 200ms.
+        * Default clock gating delay is 0ms to avoid wasting power.
         * This value can be tuned by writing into sysfs entry.
         */
-       host->clkgate_delay = 200;
+       host->clkgate_delay = 0;
        host->clk_gated = false;
        INIT_DELAYED_WORK(&host->clk_gate_work, mmc_host_clk_gate_work);
        spin_lock_init(&host->clk_lock);