Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1357669 > unrolled thread
| Started by | David Lechner <david@lechnology.com> |
|---|---|
| First post | 2016-03-15 00:00 +0100 |
| Last post | 2016-03-15 10:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 3/5] mmc: davinci: prepare clock David Lechner <david@lechnology.com> - 2016-03-15 00:00 +0100
Re: [PATCH v2 3/5] mmc: davinci: prepare clock Sekhar Nori <nsekhar@ti.com> - 2016-03-15 10:20 +0100
| From | David Lechner <david@lechnology.com> |
|---|---|
| Date | 2016-03-15 00:00 +0100 |
| Subject | [PATCH v2 3/5] mmc: davinci: prepare clock |
| Message-ID | <rcJCW-1Hd-7@gated-at.bofh.it> |
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: David Lechner <david@lechnology.com> --- v2 changes: use clk_disable_unprepare where applicable. drivers/mmc/host/davinci_mmc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index 6dd9562..8d10a92 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -1273,9 +1273,9 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev) ret = PTR_ERR(host->clk); goto clk_get_fail; } - ret = clk_enable(host->clk); + ret = clk_prepare_enable(host->clk); if (ret) - goto clk_enable_fail; + goto clk_prepare_enable_fail; host->mmc_input_clk = clk_get_rate(host->clk); @@ -1375,8 +1375,8 @@ mmc_add_host_fail: mmc_davinci_cpufreq_deregister(host); cpu_freq_fail: davinci_release_dma_channels(host); - clk_disable(host->clk); -clk_enable_fail: + clk_disable_unprepare(host->clk); +clk_prepare_enable_fail: clk_get_fail: ioremap_fail: mmc_free_host(mmc); @@ -1391,7 +1391,7 @@ static int __exit davinci_mmcsd_remove(struct platform_device *pdev) mmc_remove_host(host->mmc); mmc_davinci_cpufreq_deregister(host); davinci_release_dma_channels(host); - clk_disable(host->clk); + clk_disable_unprepare(host->clk); mmc_free_host(host->mmc); return 0; -- 1.9.1
[toc] | [next] | [standalone]
| From | Sekhar Nori <nsekhar@ti.com> |
|---|---|
| Date | 2016-03-15 10:20 +0100 |
| Message-ID | <rcTiX-8vj-15@gated-at.bofh.it> |
| In reply to | #1357669 |
On Tuesday 15 March 2016 04:24 AM, David Lechner wrote: > 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: David Lechner <david@lechnology.com> Acked-by: Sekhar Nori <nsekhar@ti.com> Regards, Sekhar
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web