]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
mmc: sdhci: Add support for platform specific delay
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Wed, 1 Feb 2017 19:40:44 +0000 (01:10 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 2 Feb 2017 09:29:29 +0000 (10:29 +0100)
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 <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/mmc/sdhci.c
include/sdhci.h

index 20cfdb3e454916e911eb7377028e3898e415edea..2f8c033ccc8b4cb1640a7a5715ec54c5249a9327 100644 (file)
@@ -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
index a8b5257198837c7a5ad61ec116b5ddb82e9daaba..4dc50eec21012c35c05e21b2bdf4b52681707604 100644 (file)
@@ -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;