From: Siva Durga Prasad Paladugu Date: Wed, 1 Feb 2017 19:40:44 +0000 (+0530) Subject: mmc: sdhci: Add support for platform specific delay X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ccd0977c2393771f801a208e91773f2bdd77e032;p=thirdparty%2Fu-boot.git mmc: sdhci: Add support for platform specific delay Add support for any platform/board specific delays requirement while setting clocks. Some boards needs to program tapdelay for setting certain high frequencies and this patch adds hook for supporting the same. Signed-off-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek --- diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 20cfdb3e454..2f8c033ccc8 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -407,6 +407,9 @@ static int sdhci_set_clock(struct mmc *mmc, unsigned int clock) if (clock == 0) return 0; + if (mmc->is_uhs && host->set_delay) + host->set_delay(host, mmc->uhsmode); + if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) { /* * Check if the Host Controller supports Programmable Clock diff --git a/include/sdhci.h b/include/sdhci.h index a8b52571988..4dc50eec210 100644 --- a/include/sdhci.h +++ b/include/sdhci.h @@ -270,6 +270,7 @@ struct sdhci_host { void (*set_control_reg)(struct sdhci_host *host); void (*set_clock)(int dev_index, unsigned int div); int (*platform_execute_tuning)(struct mmc *host, u8 opcode); + void (*set_delay)(struct sdhci_host *host, u8 uhsmode); uint voltages; struct mmc_config cfg;