aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm44xx.c
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2012-02-02 04:38:50 -0500
committerKevin Hilman <khilman@ti.com>2012-03-05 18:38:02 -0500
commit92206fd292da7632c039f6c4054bdaac08b030c0 (patch)
tree926bc332a99009f74ff355120c0b8811a1af696f /arch/arm/mach-omap2/pm44xx.c
parente68e8093ed570f9272665112d13d4c5811536680 (diff)
ARM: OMAP2+: PM: share clkdms_setup() across OMAP2, 3, 4
clkdms_setup() is identical across OMAP2, 3, and 4, so share it. Signed-off-by: Paul Walmsley <paul@pwsan.com> Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Cc: Rajendra Nayak <rnayak@ti.com> Tested-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/pm44xx.c')
-rw-r--r--arch/arm/mach-omap2/pm44xx.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index c840689df24a..84d52f729af4 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -120,22 +120,6 @@ static const struct platform_suspend_ops omap_pm_ops = {
120}; 120};
121#endif /* CONFIG_SUSPEND */ 121#endif /* CONFIG_SUSPEND */
122 122
123/*
124 * Enable hardware supervised mode for all clockdomains if it's
125 * supported. Initiate sleep transition for other clockdomains, if
126 * they are not used
127 */
128static int __init clkdms_setup(struct clockdomain *clkdm, void *unused)
129{
130 if (clkdm->flags & CLKDM_CAN_ENABLE_AUTO)
131 clkdm_allow_idle(clkdm);
132 else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP &&
133 atomic_read(&clkdm->usecount) == 0)
134 clkdm_sleep(clkdm);
135 return 0;
136}
137
138
139static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused) 123static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
140{ 124{
141 struct power_state *pwrst; 125 struct power_state *pwrst;
@@ -247,7 +231,7 @@ static int __init omap4_pm_init(void)
247 goto err2; 231 goto err2;
248 } 232 }
249 233
250 (void) clkdm_for_each(clkdms_setup, NULL); 234 (void) clkdm_for_each(omap_pm_clkdms_setup, NULL);
251 235
252#ifdef CONFIG_SUSPEND 236#ifdef CONFIG_SUSPEND
253 suspend_set_ops(&omap_pm_ops); 237 suspend_set_ops(&omap_pm_ops);