diff mbox

mmc: enable runtime PM by default

Message ID 20110717153914.A8FB49D401C@zog.reactivated.net (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Drake July 17, 2011, 3:39 p.m. UTC
Now that we have improved the runtime power management powerup/powerdown
code, we believe that MMC_CAP_POWER_OFF_CARD is no longer necessary:
runtime PM should now work everywhere.

Enable this trivially for a release or two. If no problems are reported,
we will follow up with a more extensive patch to remove this flag
altogether. If problems are reported, we can look at whitelist/blacklist
possibilities as before.

Signed-off-by: Daniel Drake <dsd@laptop.org>
---
 drivers/mmc/core/host.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

For linux-3.2. Might cause some breakage, so it should see a full
linux-next cycle first.

Comments

Ohad Ben Cohen July 18, 2011, 2:53 a.m. UTC | #1
On Sun, Jul 17, 2011 at 6:39 PM, Daniel Drake <dsd@laptop.org> wrote:
> Now that we have improved the runtime power management powerup/powerdown
> code, we believe that MMC_CAP_POWER_OFF_CARD is no longer necessary:
> runtime PM should now work everywhere.

Let's also add:

The only hard evidence for introducing MMC_CAP_POWER_OFF_CARD was the
Marvell sd8686 wifi chip, which was believed to require external gpio
manipulation which wasn't supported by some boards.

After further investigation it was realized (and confirmed by Marvell
folks) that sd8686 requirements can be fulfilled by changing the reset
sequence itself, even if no external gpio is manipulated.

For further information, see the following thread:
http://www.mail-archive.com/linux-mmc@vger.kernel.org/msg04289.html

> Enable this trivially for a release or two. If no problems are reported,
> we will follow up with a more extensive patch to remove this flag
> altogether. If problems are reported, we can look at whitelist/blacklist
> possibilities as before.

This is exactly how I planed to take this too, thanks.

Acked-by: Ohad Ben-Cohen <ohad@wizery.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index b29d3e8..63bddd0 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -301,6 +301,17 @@  struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
 	host->max_blk_size = 512;
 	host->max_blk_count = PAGE_CACHE_SIZE / 512;
 
+	/*
+	 * Enable runtime power management by default. This flag was added due
+	 * to runtime power management causing disruption for some users, but
+	 * the power on/off code has been improved since then.
+	 *
+	 * We'll enable this flag by default as an experiment, and if no
+	 * problems are reported, we will follow up later and remove the flag
+	 * altogether.
+	 */
+	host->caps = MMC_CAP_POWER_OFF_CARD;
+
 	return host;
 
 free: