From: jszhang@marvell.com (Jisheng Zhang)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] mmc: sdhci: implement light and heavy runtime pm resume
Date: Thu, 5 Feb 2015 18:20:31 +0800 [thread overview]
Message-ID: <20150205182031.1a47d726@xhacker> (raw)
Hi all,
Most sdhci_runtime_resume_host() users just gate their clocks in their runtime
suspend implementation, so the sdhci_runtime_resume_host() is too heavy, we only
need to restore interrupts registers.
The change is something as following:
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 0ad412a..9d5bdde 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2856,7 +2856,7 @@ int sdhci_runtime_suspend_host(struct sdhci_host *host)
}
EXPORT_SYMBOL_GPL(sdhci_runtime_suspend_host);
-int sdhci_runtime_resume_host(struct sdhci_host *host)
+static void sdhci_runtime_resume_reinit(struct sdhci_host *host)
{
unsigned long flags;
int host_flags = host->flags;
@@ -2880,6 +2880,15 @@ int sdhci_runtime_resume_host(struct sdhci_host *host)
sdhci_enable_preset_value(host, true);
spin_unlock_irqrestore(&host->lock, flags);
}
+}
+
+int sdhci_runtime_resume_host(struct sdhci_host *host, bool power_keeped)
+{
+ unsigned long flags;
+ int host_flags = host->flags;
+
+ if (!power_keeped)
+ sdhci_runtime_resume_reinit(host);
/* Set the re-tuning expiration flag */
if (host->flags & SDHCI_USING_RETUNING_TIMER)
It's ugly, but per my test on marvell BG2Q platforms, this change can improve
the resume latency from 5500us to 11us. Is there any better solution?
Thanks in advance,
Jisheng
reply other threads:[~2015-02-05 10:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150205182031.1a47d726@xhacker \
--to=jszhang@marvell.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).