diff options
author | Paul Walmsley <paul@pwsan.com> | 2012-02-02 04:38:50 -0500 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2012-03-05 18:38:02 -0500 |
commit | 92206fd292da7632c039f6c4054bdaac08b030c0 (patch) | |
tree | 926bc332a99009f74ff355120c0b8811a1af696f /arch/arm/mach-omap2/pm.c | |
parent | e68e8093ed570f9272665112d13d4c5811536680 (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/pm.c')
-rw-r--r-- | arch/arm/mach-omap2/pm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index c3fe8eada2cc..f9e807958f3e 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
@@ -68,6 +68,16 @@ static void omap2_init_processor_devices(void) | |||
68 | #define FORCEWAKEUP_SWITCH 0 | 68 | #define FORCEWAKEUP_SWITCH 0 |
69 | #define LOWPOWERSTATE_SWITCH 1 | 69 | #define LOWPOWERSTATE_SWITCH 1 |
70 | 70 | ||
71 | int __init omap_pm_clkdms_setup(struct clockdomain *clkdm, void *unused) | ||
72 | { | ||
73 | if (clkdm->flags & CLKDM_CAN_ENABLE_AUTO) | ||
74 | clkdm_allow_idle(clkdm); | ||
75 | else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP && | ||
76 | atomic_read(&clkdm->usecount) == 0) | ||
77 | clkdm_sleep(clkdm); | ||
78 | return 0; | ||
79 | } | ||
80 | |||
71 | /* | 81 | /* |
72 | * This sets pwrdm state (other than mpu & core. Currently only ON & | 82 | * This sets pwrdm state (other than mpu & core. Currently only ON & |
73 | * RET are supported. | 83 | * RET are supported. |