summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sdhci-pltfm.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-01-28 19:27:12 +0100
committerChris Ball <cjb@laptop.org>2013-02-24 14:37:09 -0500
commitd005d94359a8df84ea6e5ac137393707f9e87e81 (patch)
tree1cf5e1c0c6fc304e387705d00d72a82c50f82b10 /drivers/mmc/host/sdhci-pltfm.c
parent20b92a30b5610a5222060417961bc4ccb42ea5a5 (diff)
mmc: sdhci-pltfm: Add a common clk API implementation of get_timeout_clock
Quite a few drivers have a implementation of the get_timeout_clock callback which simply returns the result of clk_get_rate on the device's clock. This patch adds a common implementation of this to the sdhci-pltfm module and replaces all custom implementations with the common one. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Tested-by: Kevin Liu <kliu5@marvell.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sdhci-pltfm.c')
-rw-r--r--drivers/mmc/host/sdhci-pltfm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index d4283ef5917a..3145a780b035 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -36,6 +36,14 @@
#endif
#include "sdhci-pltfm.h"
+unsigned int sdhci_pltfm_clk_get_max_clock(struct sdhci_host *host)
+{
+ struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+
+ return clk_get_rate(pltfm_host->clk);
+}
+EXPORT_SYMBOL_GPL(sdhci_pltfm_clk_get_max_clock);
+
static struct sdhci_ops sdhci_pltfm_ops = {
};