From: r65037@freescale.com (Richard Zhu)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/9] sdhci-1: add host's own set_power func to support the controller that used it's own power mechanism
Date: Wed, 1 Sep 2010 17:45:05 +0800 [thread overview]
Message-ID: <1283334305-12453-2-git-send-email-r65037@freescale.com> (raw)
In-Reply-To: <1283334305-12453-1-git-send-email-r65037@freescale.com>
FSL's eSDHC controllers don't have the STANDARD POWER register in
the IC design, add the set_power api to support the FSL's eSDHC.
Signed-off-by: Richard Zhu <r65037@freescale.com>
---
drivers/mmc/host/sdhci.c | 5 +++++
drivers/mmc/host/sdhci.h | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 7855121..2a93c27 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1036,6 +1036,11 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned short power)
{
u8 pwr;
+ if (host->ops->set_power) {
+ host->ops->set_power(host, power);
+ return;
+ }
+
if (power == (unsigned short)-1)
pwr = 0;
else {
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 036cfae..d420b4e 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -316,6 +316,7 @@ struct sdhci_ops {
#endif
void (*set_clock)(struct sdhci_host *host, unsigned int clock);
+ void (*set_power)(struct sdhci_host *host, unsigned int power);
int (*enable_dma)(struct sdhci_host *host);
unsigned int (*get_max_clock)(struct sdhci_host *host);
--
1.7.0
next prev parent reply other threads:[~2010-09-01 9:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-01 9:45 A serial patchs that support FSL's eSDHC Richard Zhu
2010-09-01 9:45 ` Richard Zhu [this message]
2010-09-01 10:15 ` Wolfram Sang
2010-09-02 10:06 ` Zhu Richard-R65037
2010-09-06 10:30 ` Wolfram Sang
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=1283334305-12453-2-git-send-email-r65037@freescale.com \
--to=r65037@freescale.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).