summaryrefslogtreecommitdiff
path: root/drivers/mmc/core/core.c
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2011-07-17 16:38:41 +0100
committerUlf Hansson <ulf.hansson@stericsson.com>2011-09-19 16:07:31 +0200
commit3e3847f2a8dfd0e45f251d9989c6e7a54460b79e (patch)
tree01b904cedc981badefcfaa60b4abd1fbd55ef394 /drivers/mmc/core/core.c
parent667c6fde281c5bc7472777faf9a4ea2805bb0228 (diff)
mmc: print debug messages for runtime PM actions
At http://www.mail-archive.com/linux-mmc@vger.kernel.org/msg08371.html (thread: "mmc: sdio: reset card during power_restore") we found and fixed a bug where mmc's runtime power management functions were not being called. We have now also made improvements to the SDIO powerup routine which could possibly mask this kind of issue in future. Add debug messages to the runtime PM hooks so that it is easy to verify if and when runtime PM is happening. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Chris Ball <cjb@laptop.org> Change-Id: If43673c008a65d46420a77922859dbb64eef3dbb Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30690 Reviewed-by: Ulf HANSSON <ulf.hansson@stericsson.com> Tested-by: Ulf HANSSON <ulf.hansson@stericsson.com>
Diffstat (limited to 'drivers/mmc/core/core.c')
-rw-r--r--drivers/mmc/core/core.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 096dbb130f0..5fe39de8889 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1881,6 +1881,10 @@ int mmc_power_save_host(struct mmc_host *host)
{
int ret = 0;
+#ifdef CONFIG_MMC_DEBUG
+ pr_info("%s: %s: powering down\n", mmc_hostname(host), __func__);
+#endif
+
mmc_bus_get(host);
if (!host->bus_ops || host->bus_dead || !host->bus_ops->power_restore) {
@@ -1903,6 +1907,10 @@ int mmc_power_restore_host(struct mmc_host *host)
{
int ret;
+#ifdef CONFIG_MMC_DEBUG
+ pr_info("%s: %s: powering up\n", mmc_hostname(host), __func__);
+#endif
+
mmc_bus_get(host);
if (!host->bus_ops || host->bus_dead || !host->bus_ops->power_restore) {