From mboxrd@z Thu Jan 1 00:00:00 1970 From: Siva Durga Prasad Paladugu Date: Mon, 30 Jan 2017 16:08:22 +0530 Subject: [U-Boot] [UBOOT v2 05/15] mmc: sdhci: Add support for platform specific delay In-Reply-To: <1485772712-4653-1-git-send-email-sivadur@xilinx.com> References: <1485772712-4653-1-git-send-email-sivadur@xilinx.com> Message-ID: <1485772712-4653-6-git-send-email-sivadur@xilinx.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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