提交 9f24b0f2 编写于 作者: S Stefan Wahren 提交者: Ulf Hansson

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 1e5a0a9a ("mmc: sdhci-bcm2835:
Actually enable the clock") to sdhci-iproc.
Signed-off-by: NStefan Wahren <stefan.wahren@i2se.com>
Acked-by: NScott Branden <sbranden@broadcom.com>
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 e5905ff1
...@@ -207,6 +207,11 @@ static int sdhci_iproc_probe(struct platform_device *pdev) ...@@ -207,6 +207,11 @@ static int sdhci_iproc_probe(struct platform_device *pdev)
ret = PTR_ERR(pltfm_host->clk); ret = PTR_ERR(pltfm_host->clk);
goto err; 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) { if (iproc_host->data->pdata->quirks & SDHCI_QUIRK_MISSING_CAPS) {
host->caps = iproc_host->data->caps; host->caps = iproc_host->data->caps;
...@@ -215,10 +220,12 @@ static int sdhci_iproc_probe(struct platform_device *pdev) ...@@ -215,10 +220,12 @@ static int sdhci_iproc_probe(struct platform_device *pdev)
ret = sdhci_add_host(host); ret = sdhci_add_host(host);
if (ret) if (ret)
goto err; goto err_clk;
return 0; return 0;
err_clk:
clk_disable_unprepare(pltfm_host->clk);
err: err:
sdhci_pltfm_free(pdev); sdhci_pltfm_free(pdev);
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册