aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clocksource
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2011-05-31 02:26:42 -0400
committerPaul Mundt <lethal@linux-sh.org>2011-05-31 02:26:42 -0400
commit9436b4abec28a22edd961ae375535d940625f1f2 (patch)
treee0e6e4120d4364587a4830a724adea89be7a8ebb /drivers/clocksource
parentd4905ce38c73964b868037e49a5945e1cf47a7f2 (diff)
Revert "clocksource: sh_cmt: Runtime PM support"
This reverts commit 01fa68b58492a5d6708a91c1f474b6a099a9509e. The same note as per the sh_tmu change applies here, too. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r--drivers/clocksource/sh_cmt.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
index 036e5865eb40..dc7c033ef587 100644
--- a/drivers/clocksource/sh_cmt.c
+++ b/drivers/clocksource/sh_cmt.c
@@ -24,7 +24,6 @@
24#include <linux/ioport.h> 24#include <linux/ioport.h>
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/clk.h> 26#include <linux/clk.h>
27#include <linux/pm_runtime.h>
28#include <linux/irq.h> 27#include <linux/irq.h>
29#include <linux/err.h> 28#include <linux/err.h>
30#include <linux/clocksource.h> 29#include <linux/clocksource.h>
@@ -153,12 +152,10 @@ static int sh_cmt_enable(struct sh_cmt_priv *p, unsigned long *rate)
153{ 152{
154 int ret; 153 int ret;
155 154
156 /* wake up device and enable clock */ 155 /* enable clock */
157 pm_runtime_get_sync(&p->pdev->dev);
158 ret = clk_enable(p->clk); 156 ret = clk_enable(p->clk);
159 if (ret) { 157 if (ret) {
160 dev_err(&p->pdev->dev, "cannot enable clock\n"); 158 dev_err(&p->pdev->dev, "cannot enable clock\n");
161 pm_runtime_put_sync(&p->pdev->dev);
162 return ret; 159 return ret;
163 } 160 }
164 161
@@ -190,9 +187,8 @@ static void sh_cmt_disable(struct sh_cmt_priv *p)
190 /* disable interrupts in CMT block */ 187 /* disable interrupts in CMT block */
191 sh_cmt_write(p, CMCSR, 0); 188 sh_cmt_write(p, CMCSR, 0);
192 189
193 /* stop clock and mark device as idle */ 190 /* stop clock */
194 clk_disable(p->clk); 191 clk_disable(p->clk);
195 pm_runtime_put_sync(&p->pdev->dev);
196} 192}
197 193
198/* private flags */ 194/* private flags */
@@ -664,7 +660,6 @@ static int __devinit sh_cmt_probe(struct platform_device *pdev)
664 660
665 if (p) { 661 if (p) {
666 dev_info(&pdev->dev, "kept as earlytimer\n"); 662 dev_info(&pdev->dev, "kept as earlytimer\n");
667 pm_runtime_enable(&pdev->dev);
668 return 0; 663 return 0;
669 } 664 }
670 665
@@ -679,9 +674,6 @@ static int __devinit sh_cmt_probe(struct platform_device *pdev)
679 kfree(p); 674 kfree(p);
680 platform_set_drvdata(pdev, NULL); 675 platform_set_drvdata(pdev, NULL);
681 } 676 }
682
683 if (!is_early_platform_device(pdev))
684 pm_runtime_enable(&pdev->dev);
685 return ret; 677 return ret;
686} 678}
687 679