summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorStefan Wahren <stefan.wahren@i2se.com>2016-01-17 14:59:01 +0000
committerUlf Hansson <ulf.hansson@linaro.org>2016-02-29 11:02:49 +0100
commit9f24b0f2542f60bde7b699469a97cd852e1eed79 (patch)
treed5b1c513d45bb44da14f7500343a089ab47f7966 /drivers/mmc
parente5905ff1281f0a0f5c9863c430ac1ed5faaf5707 (diff)
mmc: sdhci-iproc: Actually enable the clock
The RPi firmware-based clocks driver can actually disable unused clocks, so when switching to use it we ended up losing our MMC clock once all devices were probed. This patch adopts the changes from 1e5a0a9a58e2 ("mmc: sdhci-bcm2835: Actually enable the clock") to sdhci-iproc. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Acked-by: Scott Branden <sbranden@broadcom.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci-iproc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
index e22060a80dbf..55bc348ccae0 100644
--- a/drivers/mmc/host/sdhci-iproc.c
+++ b/drivers/mmc/host/sdhci-iproc.c
@@ -207,6 +207,11 @@ static int sdhci_iproc_probe(struct platform_device *pdev)
ret = PTR_ERR(pltfm_host->clk);
goto err;
}
+ ret = clk_prepare_enable(pltfm_host->clk);
+ if (ret) {
+ dev_err(&pdev->dev, "failed to enable host clk\n");
+ goto err;
+ }
if (iproc_host->data->pdata->quirks & SDHCI_QUIRK_MISSING_CAPS) {
host->caps = iproc_host->data->caps;
@@ -215,10 +220,12 @@ static int sdhci_iproc_probe(struct platform_device *pdev)
ret = sdhci_add_host(host);
if (ret)
- goto err;
+ goto err_clk;
return 0;
+err_clk:
+ clk_disable_unprepare(pltfm_host->clk);
err:
sdhci_pltfm_free(pdev);
return ret;