mmc: core: Support aggressive power management for (e)MMC/SD
authorUlf Hansson <ulf.hansson@linaro.org>
Thu, 2 May 2013 12:02:39 +0000 (14:02 +0200)
committerlintao <lintao@rock-chips.com>
Fri, 7 Mar 2014 04:46:23 +0000 (12:46 +0800)
commit0a82e11529ad0a900534c68958a1baf37c1afa2d
tree5f5972f1147d50e3151a9c4aab5686323566681e
parent22c6d9771f91da26f12857ad9069ff0a48d7bb39
mmc: core: Support aggressive power management for (e)MMC/SD

Aggressive power management is suitable when saving power is
essential. At request inactivity timeout, aka pm runtime
autosuspend timeout, the card will be suspended.

Once a new request arrives, the card will be re-initalized and
thus the first request will suffer from a latency. This latency
is card-specific, experiments has shown in general that SD-cards
has quite poor initialization time, around 300ms-1100ms. eMMC is
not surprisingly far better but still a couple of hundreds of ms
has been observed.

Except for the request latency, it is important to know that
suspending the card will also prevent the card from executing
internal house-keeping operations in idle mode. This could mean
degradation in performance.

To use this feature make sure the request inactivity timeout is
chosen carefully. This has not been done as a part of this patch.

Enable this feature by using host cap MMC_CAP_AGGRESSIVE_PM and
by setting CONFIG_MMC_UNSAFE_RESUME.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/core/mmc.c
drivers/mmc/core/sd.c
include/linux/mmc/host.h