diff options
author | ban_feng <Ban_Feng@asus.com> | 2012-03-28 17:30:16 +0800 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2015-02-03 15:51:48 +0100 |
commit | d9a0d0137d952e1adad44ee96069dc2db30e06c9 (patch) | |
tree | ab03c461ebc8383c8382eefbafcfae313c74d48c /drivers | |
parent | 5f7bbcaf707c56badf8dd9354994ea908561eda6 (diff) |
eMMC: Add more debugging messages
Change-Id: I28d670944cbfd55e2b2ad98b727368a8dfdc0944
Change-Id: I2bb65335c2468b257473fe264e705826cfd4474e
Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/45300
Reviewed-by: Ban Feng <Ban_Feng@asus.com>
Tested-by: Ban Feng <Ban_Feng@asus.com>
Reviewed-by: Sam hblee <Sam_hblee@asus.com>
(cherry picked from commit 1711f72a9840f3667cf93c774ac16c2d8417375c)
Conflicts:
drivers/mmc/core/core.c
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/card/queue.c | 4 | ||||
-rw-r--r-- | drivers/mmc/core/core.c | 9 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci-pltfm.c | 10 |
3 files changed, 22 insertions, 1 deletions
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index 5db38cbcea6d..01c0357656a7 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c @@ -20,6 +20,8 @@ #include <linux/mmc/host.h> #include "queue.h" +#include "../debug_mmc.h" + #define MMC_QUEUE_BOUNCESZ 65536 #define MMC_QUEUE_SUSPENDED (1 << 0) @@ -349,6 +351,7 @@ void mmc_queue_suspend(struct mmc_queue *mq) if (!(mq->flags & MMC_QUEUE_SUSPENDED)) { mq->flags |= MMC_QUEUE_SUSPENDED; + MMC_printk("%s: blk_stop_queue start", mmc_hostname(mq->card->host)); spin_lock_irqsave(q->queue_lock, flags); blk_stop_queue(q); @@ -369,6 +372,7 @@ void mmc_queue_resume(struct mmc_queue *mq) if (mq->flags & MMC_QUEUE_SUSPENDED) { mq->flags &= ~MMC_QUEUE_SUSPENDED; + MMC_printk("%s: blk_start_queue start", mmc_hostname(mq->card->host)); up(&mq->thread_sem); diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 4b9d1873e0e2..bc200be1b3c0 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1985,8 +1985,10 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq) mmc_send_if_cond(host, host->ocr_avail); /* Order's important: probe SDIO, then SD, then MMC */ - if (!mmc_attach_sdio(host)) + if (!mmc_attach_sdio(host)) { + MMC_printk("%s: sdio completed", mmc_hostname(host)); return 0; + } if (!mmc_attach_sd(host)) return 0; if (!mmc_attach_mmc(host)) { @@ -2339,6 +2341,8 @@ int mmc_pm_notify(struct notifier_block *notify_block, notify_block, struct mmc_host, pm_notify); unsigned long flags; + printk("[mmc]mmc_pm_notify start\n"); + MMC_printk("%s: mode %ld, bus_resume_flags %d rescan_disable %d", mmc_hostname(host), mode, host->bus_resume_flags, host->rescan_disable); switch (mode) { case PM_HIBERNATION_PREPARE: @@ -2366,6 +2370,7 @@ int mmc_pm_notify(struct notifier_block *notify_block, mmc_power_off(host); mmc_release_host(host); host->pm_flags = 0; + MMC_printk("mode %ld ended", mode); break; case PM_POST_SUSPEND: @@ -2383,6 +2388,8 @@ int mmc_pm_notify(struct notifier_block *notify_block, } + MMC_printk("%s finished", mmc_hostname(host)); + return 0; } #endif diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index 1179f1be4318..6c62a733bf15 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c @@ -35,6 +35,8 @@ #endif #include "sdhci-pltfm.h" +#include "../debug_mmc.h" + static struct sdhci_ops sdhci_pltfm_ops = { }; @@ -198,6 +200,8 @@ int sdhci_pltfm_suspend(struct platform_device *dev, pm_message_t state) struct sdhci_host *host = platform_get_drvdata(dev); int ret; + MMC_printk("%s: ++", mmc_hostname(host->mmc)); + ret = sdhci_suspend_host(host, state); if (ret) { dev_err(&dev->dev, "suspend failed, error = %d\n", ret); @@ -211,6 +215,8 @@ int sdhci_pltfm_suspend(struct platform_device *dev, pm_message_t state) sdhci_resume_host(host); } + MMC_printk("%s: --", mmc_hostname(host->mmc)); + return ret; } EXPORT_SYMBOL_GPL(sdhci_pltfm_suspend); @@ -220,6 +226,8 @@ int sdhci_pltfm_resume(struct platform_device *dev) struct sdhci_host *host = platform_get_drvdata(dev); int ret = 0; + MMC_printk("%s: ++", mmc_hostname(host->mmc)); + if (host->ops && host->ops->resume) ret = host->ops->resume(host); if (ret) { @@ -231,6 +239,8 @@ int sdhci_pltfm_resume(struct platform_device *dev) if (ret) dev_err(&dev->dev, "resume failed, error = %d\n", ret); + MMC_printk("%s: --", mmc_hostname(host->mmc)); + return ret; } EXPORT_SYMBOL_GPL(sdhci_pltfm_resume); |