[PATCH 1/3] mmc: sdhci: introduce start_tuning() hook

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The tuning start process may be different from standard SD controller
for some specific controllers, like eSDHC and F_SDH30 (which is using
SDHCI_QUIRK2_TUNING_WORK_AROUND now). So introduce a start_tuning() hook.

Signed-off-by: Yangbo Lu <yangbo.lu@xxxxxxx>
---
 drivers/mmc/host/sdhci.c | 5 ++++-
 drivers/mmc/host/sdhci.h | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index a5dc5aa..2f40490 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2471,7 +2471,10 @@ int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
 	if (host->tuning_delay < 0)
 		host->tuning_delay = opcode == MMC_SEND_TUNING_BLOCK;
 
-	sdhci_start_tuning(host);
+	if (host->ops->start_tuning)
+		host->ops->start_tuning(host);
+	else
+		sdhci_start_tuning(host);
 
 	host->tuning_err = __sdhci_execute_tuning(host, opcode);
 
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 902f855..30c8349a 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -643,6 +643,7 @@ struct sdhci_ops {
 	void	(*voltage_switch)(struct sdhci_host *host);
 	void	(*adma_write_desc)(struct sdhci_host *host, void **desc,
 				   dma_addr_t addr, int len, unsigned int cmd);
+	void	(*start_tuning)(struct sdhci_host *host);
 };
 
 #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
-- 
2.7.4




[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux