aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/power/clock_ops.c
diff options
context:
space:
mode:
authorMurali Karicheri <m-karicheri2@ti.com>2012-10-22 19:18:40 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2012-11-14 18:36:43 -0500
commitc122f27e1c1bada4cdf19669afed5a00a69bc5a5 (patch)
treeef6812f564e97713867c939934c8cdf57945f02b /drivers/base/power/clock_ops.c
parent77b67063bb6bce6d475e910d3b886a606d0d91f7 (diff)
base: power - use clk_prepare_enable and clk_prepare_disable
When PM runtime is enabled in DaVinci and the machine migrates to common clk framework, the clk_enable() gets called without clk_prepare(). This patch is to fix this issue so that PM run time can inter work with common clk framework. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base/power/clock_ops.c')
-rw-r--r--drivers/base/power/clock_ops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c
index eb78e9640c4a..9d8fde709390 100644
--- a/drivers/base/power/clock_ops.c
+++ b/drivers/base/power/clock_ops.c
@@ -99,7 +99,7 @@ static void __pm_clk_remove(struct pm_clock_entry *ce)
99 99
100 if (ce->status < PCE_STATUS_ERROR) { 100 if (ce->status < PCE_STATUS_ERROR) {
101 if (ce->status == PCE_STATUS_ENABLED) 101 if (ce->status == PCE_STATUS_ENABLED)
102 clk_disable(ce->clk); 102 clk_disable_unprepare(ce->clk);
103 103
104 if (ce->status >= PCE_STATUS_ACQUIRED) 104 if (ce->status >= PCE_STATUS_ACQUIRED)
105 clk_put(ce->clk); 105 clk_put(ce->clk);
@@ -396,7 +396,7 @@ static void enable_clock(struct device *dev, const char *con_id)
396 396
397 clk = clk_get(dev, con_id); 397 clk = clk_get(dev, con_id);
398 if (!IS_ERR(clk)) { 398 if (!IS_ERR(clk)) {
399 clk_enable(clk); 399 clk_prepare_enable(clk);
400 clk_put(clk); 400 clk_put(clk);
401 dev_info(dev, "Runtime PM disabled, clock forced on.\n"); 401 dev_info(dev, "Runtime PM disabled, clock forced on.\n");
402 } 402 }
@@ -413,7 +413,7 @@ static void disable_clock(struct device *dev, const char *con_id)
413 413
414 clk = clk_get(dev, con_id); 414 clk = clk_get(dev, con_id);
415 if (!IS_ERR(clk)) { 415 if (!IS_ERR(clk)) {
416 clk_disable(clk); 416 clk_disable_unprepare(clk);
417 clk_put(clk); 417 clk_put(clk);
418 dev_info(dev, "Runtime PM disabled, clock forced off.\n"); 418 dev_info(dev, "Runtime PM disabled, clock forced off.\n");
419 } 419 }