linux-sg2042/drivers/mmc/core
Linus Walleij 04566831a7 mmc: Aggressive clock gating framework
This patch modifies the MMC core code to optionally call the set_ios()
operation on the driver with the clock frequency set to 0 (gate) after
a grace period of at least 8 MCLK cycles, then restore it (ungate)
before any new request. This gives the driver the option to shut down
the MCI clock to the MMC/SD card when the clock frequency is 0, i.e.
the core has stated that the MCI clock does not need to be generated.

It is inspired by existing clock gating code found in the OMAP and
Atmel drivers and brings this up to the host abstraction.  Gating is
performed before and after any MMC request.

This patchset implements this for the MMCI/PL180 MMC/SD host controller,
but it should be simple to switch OMAP/Atmel over to using this instead.

mmc_set_{gated,ungated}() add variable protection to the state holders
for the clock gating code.  This is particularly important when ordinary
.set_ios() calls would race with the .set_ios() call resulting from a
delayed gate operation.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Reviewed-by: Chris Ball <cjb@laptop.org>
Tested-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2011-01-08 22:48:03 -05:00
..
Kconfig mmc: Aggressive clock gating framework 2011-01-08 22:48:03 -05:00
Makefile mmc: Makefile: Fix EXTRA_CFLAGS assignment 2010-10-23 21:11:15 +08:00
bus.c mmc: add runtime PM handlers 2010-10-23 21:11:18 +08:00
bus.h mmc: rename dev_to_mmc_card() to mmc_dev_to_card() 2010-10-23 21:11:12 +08:00
core.c mmc: Aggressive clock gating framework 2011-01-08 22:48:03 -05:00
core.h mmc: Aggressive clock gating framework 2011-01-08 22:48:03 -05:00
debugfs.c mmc: Aggressive clock gating framework 2011-01-08 22:48:03 -05:00
host.c mmc: Aggressive clock gating framework 2011-01-08 22:48:03 -05:00
host.h mmc: Aggressive clock gating framework 2011-01-08 22:48:03 -05:00
mmc.c mmc: Fix printing of card DDR type 2010-11-07 16:45:08 -05:00
mmc_ops.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
mmc_ops.h mmc: add mmc card sleep and awake support 2009-09-23 07:39:33 -07:00
sd.c mmc: propagate power save/restore ops return value 2010-10-23 21:11:17 +08:00
sd.h mmc: split mmc_sd_init_card() 2010-08-11 08:59:02 -07:00
sd_ops.c mmc: add erase, secure erase, trim and secure trim operations 2010-08-12 08:43:30 -07:00
sd_ops.h mmc: add erase, secure erase, trim and secure trim operations 2010-08-12 08:43:30 -07:00
sdio.c mmc: sdio: fix runtime PM anomalies by introducing MMC_CAP_POWER_OFF_CARD 2010-11-19 17:07:01 -05:00
sdio_bus.c mmc: sdio: fix runtime PM anomalies by introducing MMC_CAP_POWER_OFF_CARD 2010-11-19 17:07:01 -05:00
sdio_bus.h mmc: basic SDIO device model 2007-09-23 19:45:31 +02:00
sdio_cis.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sdio_cis.h sdio: split up common and function CIS parsing 2007-09-23 20:44:22 +02:00
sdio_io.c sdio: add new function for RAW (Read after Write) operation 2010-05-27 09:12:40 -07:00
sdio_irq.c sdio: give sdio irq thread a host specific name 2008-10-12 11:04:30 +02:00
sdio_ops.c sdio: recognize io card without powercycle 2010-03-12 15:52:28 -08:00
sdio_ops.h sdio: recognize io card without powercycle 2010-03-12 15:52:28 -08:00