summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sdhci.h
diff options
context:
space:
mode:
authorLudovic Desroches <ludovic.desroches@atmel.com>2016-04-07 12:13:08 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2016-05-02 11:33:26 +0300
commitfb9ee04779cf34a10ef7afaabf4e8055688777c4 (patch)
tree01c3c9946d99848bd80f93dbcd745db2cf6eb1ff /drivers/mmc/host/sdhci.h
parent02d0b68524c0848f5de89a0ecd1e97790018d7d3 (diff)
downloadlinux-fb9ee04779cf34a10ef7afaabf4e8055688777c4.tar.xz
mmc: sdhci: Introduce sdhci_calc_clk()
In order to remove the SDHCI_QUIRK2_NEED_DELAY_AFTER_INT_CLK_RST and to reduce code duplication, put the code relative to the SD clock configuration in a function which can be used by hosts for the implementation of the ->set_clock() callback. Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/sdhci.h')
-rw-r--r--drivers/mmc/host/sdhci.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 0f39f4f84d10..9db5090161d8 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -661,6 +661,8 @@ static inline bool sdhci_sdio_irq_enabled(struct sdhci_host *host)
return !!(host->flags & SDHCI_SDIO_IRQ_ENABLED);
}
+u16 sdhci_calc_clk(struct sdhci_host *host, unsigned int clock,
+ unsigned int *actual_clock);
void sdhci_set_clock(struct sdhci_host *host, unsigned int clock);
void sdhci_set_power(struct sdhci_host *host, unsigned char mode,
unsigned short vdd);