mmc: core: Add MMC_CAP_RUNTIME_RESUME to resume at runtime_resume
authorUlf Hansson <ulf.hansson@linaro.org>
Thu, 10 Oct 2013 15:22:23 +0000 (17:22 +0200)
committerlintao <lintao@rock-chips.com>
Fri, 7 Mar 2014 11:35:27 +0000 (19:35 +0800)
commit0233fd23a55524dc0c786eaecd8bb2e68a6a6ea4
treec0643f2f6bd995ef205a1a5f8b33e363533f0e7a
parent80b121f6a422b73f48dfd433838c0a02b27d0d2b
mmc: core: Add MMC_CAP_RUNTIME_RESUME to resume at runtime_resume

In some environments it is to prefer to postpone the resume of the card
device until runtime_resume is being carried out, since it will mean a
signficant decrease of the total system resume time.

The reason of the decreased resume time is simply because of the actual
re-initalization of the card, which typically takes hundreds of
milliseconds, is performed outside the resume sequence and wont thus
affect it.

For removable card, the detect work tries to re-detect the card to make
sure it is still present, as a part of that sequence the card will also
be runtime_resumed and thus also fully resumed.

For a non-removable card, typically a mmc blk request will trigger a
runtime_resume and thus fully resume the card. This also means the
first request will likely suffer from an inital latency since the
re-initialization of the card needs to be performed.

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