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 <siva...@xilinx.com>
---
Changes from v1:
- None
---
 drivers/mmc/sdhci.c | 3 +++
 include/sdhci.h     | 1 +
 2 files changed, 4 insertions(+)

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index a24cc15..bbb6302 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -405,6 +405,9 @@ static int sdhci_set_clock(struct mmc *mmc, unsigned int 
clock)
        if (clock == 0)
                return 0;
 
+       if (mmc->is_uhs && host->ops->set_delay)
+               host->ops->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 dbe3836..a0449d9 100644
--- a/include/sdhci.h
+++ b/include/sdhci.h
@@ -251,6 +251,7 @@ struct sdhci_ops {
        void    (*set_ios_post)(struct sdhci_host *host);
        void    (*set_clock)(struct sdhci_host *host, u32 div);
        int     (*platform_execute_tuning)(struct mmc *host, u8 opcode);
+       void    (*set_delay)(struct sdhci_host *host, u8 uhsmode);
 };
 
 struct sdhci_host {
-- 
2.7.4

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to