Message ID | 1457567405-30475-4-git-send-email-david@lechnology.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thursday 10 March 2016 05:20 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. > > Signed-off-by: David Lechner <david@lechnology.com> Patch looks good. But I wonder how you hit this issue since we dont use common clock framework on mach-davinci and this driver is not used anywhere else AFAIK. Regards, Sekhar
On 03/14/2016 06:54 AM, Sekhar Nori wrote: > On Thursday 10 March 2016 05:20 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. >> >> Signed-off-by: David Lechner <david@lechnology.com> > Patch looks good. But I wonder how you hit this issue since we dont use > common clock framework on mach-davinci and this driver is not used > anywhere else AFAIK. > > Regards, > Sekhar > Because I am working towards getting the common clock framework working on mach-davinci - at least with da8xx/device tree. :-)
On 03/14/2016 12:09 PM, David Lechner wrote: > On 03/14/2016 06:54 AM, Sekhar Nori wrote: >> On Thursday 10 March 2016 05:20 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. >>> >>> Signed-off-by: David Lechner <david@lechnology.com> >> Patch looks good. But I wonder how you hit this issue since we dont use >> common clock framework on mach-davinci and this driver is not used >> anywhere else AFAIK. >> >> Regards, >> Sekhar >> > Because I am working towards getting the common clock framework working > on mach-davinci - at least with da8xx/device tree. :-) I should also mention that I did test using the existing mach-davinci clocks as well.
On Monday 14 March 2016 10:39 PM, David Lechner wrote: > On 03/14/2016 06:54 AM, Sekhar Nori wrote: >> On Thursday 10 March 2016 05:20 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. >>> >>> Signed-off-by: David Lechner <david@lechnology.com> >> Patch looks good. But I wonder how you hit this issue since we dont use >> common clock framework on mach-davinci and this driver is not used >> anywhere else AFAIK. >> >> Regards, >> Sekhar >> > Because I am working towards getting the common clock framework working > on mach-davinci - at least with da8xx/device tree. :-) Alright, glad to know someone is pursuing this. Thanks, Sekhar
diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index f571549..b160feb 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -1283,9 +1283,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); @@ -1384,7 +1384,7 @@ mmc_add_host_fail: cpu_freq_fail: davinci_release_dma_channels(host); clk_disable(host->clk); -clk_enable_fail: +clk_prepare_enable_fail: clk_put(host->clk); clk_get_fail: iounmap(host->base);
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. Signed-off-by: David Lechner <david@lechnology.com> --- drivers/mmc/host/davinci_mmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)