aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorKalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>2008-09-26 04:04:20 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2009-11-11 17:42:49 -0500
commit0343371e22dcfec9291193ad3e771dbce3a93670 (patch)
tree8696dc32ae753fcf1b569f9b277190b5393e3dd9 /arch/arm/mach-omap2
parent0f724ed92b0ad152a03b7a194815787eeeec17a4 (diff)
OMAP3: PM: CPUidle: fix init sequencing
Previously omap3_idle_init() was called in device_init, while omap_pm_init() is called at late_initcall. This causes the cpu idle driver to call omap_sram_idle before it is properly initialized. This patch fixes the issue by moving omap3_idle_init into omap3_pm_init. Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/cpuidle34xx.c8
-rw-r--r--arch/arm/mach-omap2/pm.h1
-rw-r--r--arch/arm/mach-omap2/pm34xx.c3
3 files changed, 8 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index b0bee34c5107..ad3af11f8f6e 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -227,7 +227,7 @@ struct cpuidle_driver omap3_idle_driver = {
227 * Registers the OMAP3 specific cpuidle driver with the cpuidle 227 * Registers the OMAP3 specific cpuidle driver with the cpuidle
228 * framework with the valid set of states. 228 * framework with the valid set of states.
229 */ 229 */
230int omap3_idle_init(void) 230int __init omap3_idle_init(void)
231{ 231{
232 int i, count = 0; 232 int i, count = 0;
233 struct omap3_processor_cx *cx; 233 struct omap3_processor_cx *cx;
@@ -272,5 +272,9 @@ int omap3_idle_init(void)
272 272
273 return 0; 273 return 0;
274} 274}
275device_initcall(omap3_idle_init); 275#else
276int __init omap3_idle_init(void)
277{
278 return 0;
279}
276#endif /* CONFIG_CPU_IDLE */ 280#endif /* CONFIG_CPU_IDLE */
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index 379e35034ccc..0bf345db7147 100644
--- a/arch/arm/mach-omap2/pm.h
+++ b/arch/arm/mach-omap2/pm.h
@@ -21,6 +21,7 @@ extern void omap3_pm_off_mode_enable(int);
21extern void omap_sram_idle(void); 21extern void omap_sram_idle(void);
22extern int omap3_can_sleep(void); 22extern int omap3_can_sleep(void);
23extern int set_pwrdm_state(struct powerdomain *pwrdm, u32 state); 23extern int set_pwrdm_state(struct powerdomain *pwrdm, u32 state);
24extern int omap3_idle_init(void);
24 25
25extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm); 26extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm);
26extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state); 27extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state);
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 69c47edcc0f2..501b00100d59 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -1099,9 +1099,8 @@ static int __init omap3_pm_init(void)
1099 suspend_set_ops(&omap_pm_ops); 1099 suspend_set_ops(&omap_pm_ops);
1100#endif /* CONFIG_SUSPEND */ 1100#endif /* CONFIG_SUSPEND */
1101 1101
1102#ifndef CONFIG_CPU_IDLE
1103 pm_idle = omap3_pm_idle; 1102 pm_idle = omap3_pm_idle;
1104#endif 1103 omap3_idle_init();
1105 1104
1106 pwrdm_add_wkdep(neon_pwrdm, mpu_pwrdm); 1105 pwrdm_add_wkdep(neon_pwrdm, mpu_pwrdm);
1107 /* 1106 /*