Commit e2f3bfbd authored by David Lechner's avatar David Lechner Committed by Ulf Hansson

mmc: davinci: prepare clock

When trying to use this driver with the common clock framework, enabling
the clock fails because it was not prepared. This fixes the problem by
calling clk_prepare and clk_enable in a single function. Ditto for
clk_disable_unprepare.
Signed-off-by: default avatarDavid Lechner <david@lechnology.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 62ac52b2
...@@ -1245,9 +1245,9 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev) ...@@ -1245,9 +1245,9 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev)
ret = PTR_ERR(host->clk); ret = PTR_ERR(host->clk);
goto clk_get_fail; goto clk_get_fail;
} }
ret = clk_enable(host->clk); ret = clk_prepare_enable(host->clk);
if (ret) if (ret)
goto clk_enable_fail; goto clk_prepare_enable_fail;
host->mmc_input_clk = clk_get_rate(host->clk); host->mmc_input_clk = clk_get_rate(host->clk);
...@@ -1353,8 +1353,8 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev) ...@@ -1353,8 +1353,8 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev)
cpu_freq_fail: cpu_freq_fail:
davinci_release_dma_channels(host); davinci_release_dma_channels(host);
dma_probe_defer: dma_probe_defer:
clk_disable(host->clk); clk_disable_unprepare(host->clk);
clk_enable_fail: clk_prepare_enable_fail:
clk_get_fail: clk_get_fail:
ioremap_fail: ioremap_fail:
mmc_free_host(mmc); mmc_free_host(mmc);
...@@ -1369,7 +1369,7 @@ static int __exit davinci_mmcsd_remove(struct platform_device *pdev) ...@@ -1369,7 +1369,7 @@ static int __exit davinci_mmcsd_remove(struct platform_device *pdev)
mmc_remove_host(host->mmc); mmc_remove_host(host->mmc);
mmc_davinci_cpufreq_deregister(host); mmc_davinci_cpufreq_deregister(host);
davinci_release_dma_channels(host); davinci_release_dma_channels(host);
clk_disable(host->clk); clk_disable_unprepare(host->clk);
mmc_free_host(host->mmc); mmc_free_host(host->mmc);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment