Skip to content

Commit

Permalink
mmc: sdhci-iproc: Actually enable the clock
Browse files Browse the repository at this point in the history
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 1e5a0a9 ("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>
  • Loading branch information
Stefan Wahren authored and Ulf Hansson committed Feb 29, 2016
1 parent e5905ff commit 9f24b0f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/mmc/host/sdhci-iproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 9f24b0f

Please sign in to comment.