@@ -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);
@@ -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
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@nxp.com> --- drivers/mmc/host/sdhci.c | 5 ++++- drivers/mmc/host/sdhci.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-)