linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [v2, 1/8] mmc: sdhci: add a callback of signal voltage switching
@ 2015-09-17  5:50 Yangbo Lu
  2015-09-17  5:50 ` [v2, 2/8] mmc: sdhci: add a callback of tuning block setting Yangbo Lu
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Yangbo Lu @ 2015-09-17  5:50 UTC (permalink / raw)
  To: linux-mmc, ulf.hansson; +Cc: Yangbo Lu

Add a signal voltage switching callback to let host use its own
switching process.

Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
---
Changes for v2:
	- Modified commit message
	- Added SDR50 support patches
---
 drivers/mmc/host/sdhci.c | 5 +++++
 drivers/mmc/host/sdhci.h | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 64b7fdb..9b3d4c2 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1757,6 +1757,11 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
 	if (host->version < SDHCI_SPEC_300)
 		return 0;
 
+	if (host->ops->signal_voltage_switch) {
+		host->ops->signal_voltage_switch(host, ios->signal_voltage);
+		return 0;
+	}
+
 	ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
 
 	switch (ios->signal_voltage) {
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 7c02ff4..723f034 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -544,6 +544,8 @@ struct sdhci_ops {
 					 struct mmc_card *card,
 					 unsigned int max_dtr, int host_drv,
 					 int card_drv, int *drv_type);
+	void	(*signal_voltage_switch)(struct sdhci_host *host,
+					 unsigned char signal_voltage);
 };
 
 #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
-- 
2.1.0.27.g96db324


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-10-16 13:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-17  5:50 [v2, 1/8] mmc: sdhci: add a callback of signal voltage switching Yangbo Lu
2015-09-17  5:50 ` [v2, 2/8] mmc: sdhci: add a callback of tuning block setting Yangbo Lu
2015-09-17  5:50 ` [v2, 3/8] mmc: dt: add DT bindings for Freescale eSDHC Yangbo Lu
2015-09-17  5:50 ` [v2, 4/8] mmc: sdhci-of-esdhc: add eMMC Adapter Card HS200 mode support Yangbo Lu
2015-09-17  5:50 ` [v2, 5/8] mmc: sdhci: add SDHCI_QUIRK2_DELAY_BETWEEN_TUNING_CYCLES quirk Yangbo Lu
2015-09-17  5:50 ` [v2, 6/8] mmc: sdhci-of-esdhc: add tuning cycles delay quirk for t2080/t1040 Yangbo Lu
2015-09-17  5:50 ` [v2, 7/8] mmc: sd: set 4bit bus width after IO signal voltage switching Yangbo Lu
2015-09-17  5:50 ` [v2, 8/8] mmc: sdhci-of-esdhc: add SDR50 mode support for SD/MMC Legacy Adapter Card Yangbo Lu
2015-10-16 13:18 ` [v2, 1/8] mmc: sdhci: add a callback of signal voltage switching Ulf Hansson

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).