diff options
author | Nicolas Pitre <nicolas.pitre@linaro.org> | 2012-01-04 16:27:48 -0500 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2012-01-20 18:55:06 -0500 |
commit | 0bcd24b0f414003c695e2ecf16b9ffa14d184f48 (patch) | |
tree | eee9b72c44f0b745b29cf2733e625f4f654a1a28 /arch | |
parent | 4fa20439a80c008d33f2865b0db94dcb5da467e2 (diff) |
ARM: OMAP: convert idle handlers from pm_idle to arm_pm_idle
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap1/pm.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm24xx.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm34xx.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm44xx.c | 4 |
4 files changed, 6 insertions, 20 deletions
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 6c6a2dc554ef..0c2c3669d594 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c | |||
@@ -42,9 +42,9 @@ | |||
42 | #include <linux/sysfs.h> | 42 | #include <linux/sysfs.h> |
43 | #include <linux/module.h> | 43 | #include <linux/module.h> |
44 | #include <linux/io.h> | 44 | #include <linux/io.h> |
45 | #include <linux/atomic.h> | ||
45 | 46 | ||
46 | #include <asm/irq.h> | 47 | #include <asm/irq.h> |
47 | #include <linux/atomic.h> | ||
48 | #include <asm/mach/time.h> | 48 | #include <asm/mach/time.h> |
49 | #include <asm/mach/irq.h> | 49 | #include <asm/mach/irq.h> |
50 | 50 | ||
@@ -108,13 +108,7 @@ void omap1_pm_idle(void) | |||
108 | __u32 use_idlect1 = arm_idlect1_mask; | 108 | __u32 use_idlect1 = arm_idlect1_mask; |
109 | int do_sleep = 0; | 109 | int do_sleep = 0; |
110 | 110 | ||
111 | local_irq_disable(); | ||
112 | local_fiq_disable(); | 111 | local_fiq_disable(); |
113 | if (need_resched()) { | ||
114 | local_fiq_enable(); | ||
115 | local_irq_enable(); | ||
116 | return; | ||
117 | } | ||
118 | 112 | ||
119 | #if defined(CONFIG_OMAP_MPU_TIMER) && !defined(CONFIG_OMAP_DM_TIMER) | 113 | #if defined(CONFIG_OMAP_MPU_TIMER) && !defined(CONFIG_OMAP_DM_TIMER) |
120 | #warning Enable 32kHz OS timer in order to allow sleep states in idle | 114 | #warning Enable 32kHz OS timer in order to allow sleep states in idle |
@@ -157,14 +151,12 @@ void omap1_pm_idle(void) | |||
157 | omap_writel(saved_idlect1, ARM_IDLECT1); | 151 | omap_writel(saved_idlect1, ARM_IDLECT1); |
158 | 152 | ||
159 | local_fiq_enable(); | 153 | local_fiq_enable(); |
160 | local_irq_enable(); | ||
161 | return; | 154 | return; |
162 | } | 155 | } |
163 | omap_sram_suspend(omap_readl(ARM_IDLECT1), | 156 | omap_sram_suspend(omap_readl(ARM_IDLECT1), |
164 | omap_readl(ARM_IDLECT2)); | 157 | omap_readl(ARM_IDLECT2)); |
165 | 158 | ||
166 | local_fiq_enable(); | 159 | local_fiq_enable(); |
167 | local_irq_enable(); | ||
168 | } | 160 | } |
169 | 161 | ||
170 | /* | 162 | /* |
@@ -684,7 +676,7 @@ static int __init omap_pm_init(void) | |||
684 | return -ENODEV; | 676 | return -ENODEV; |
685 | } | 677 | } |
686 | 678 | ||
687 | pm_idle = omap1_pm_idle; | 679 | arm_pm_idle = omap1_pm_idle; |
688 | 680 | ||
689 | if (cpu_is_omap7xx()) | 681 | if (cpu_is_omap7xx()) |
690 | setup_irq(INT_7XX_WAKE_UP_REQ, &omap_wakeup_irq); | 682 | setup_irq(INT_7XX_WAKE_UP_REQ, &omap_wakeup_irq); |
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c index b8822f8b2891..1f736222a629 100644 --- a/arch/arm/mach-omap2/pm24xx.c +++ b/arch/arm/mach-omap2/pm24xx.c | |||
@@ -232,7 +232,6 @@ static int omap2_can_sleep(void) | |||
232 | 232 | ||
233 | static void omap2_pm_idle(void) | 233 | static void omap2_pm_idle(void) |
234 | { | 234 | { |
235 | local_irq_disable(); | ||
236 | local_fiq_disable(); | 235 | local_fiq_disable(); |
237 | 236 | ||
238 | if (!omap2_can_sleep()) { | 237 | if (!omap2_can_sleep()) { |
@@ -249,7 +248,6 @@ static void omap2_pm_idle(void) | |||
249 | 248 | ||
250 | out: | 249 | out: |
251 | local_fiq_enable(); | 250 | local_fiq_enable(); |
252 | local_irq_enable(); | ||
253 | } | 251 | } |
254 | 252 | ||
255 | #ifdef CONFIG_SUSPEND | 253 | #ifdef CONFIG_SUSPEND |
@@ -468,7 +466,7 @@ static int __init omap2_pm_init(void) | |||
468 | } | 466 | } |
469 | 467 | ||
470 | suspend_set_ops(&omap_pm_ops); | 468 | suspend_set_ops(&omap_pm_ops); |
471 | pm_idle = omap2_pm_idle; | 469 | arm_pm_idle = omap2_pm_idle; |
472 | 470 | ||
473 | return 0; | 471 | return 0; |
474 | } | 472 | } |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index fc6987578920..b77df735fa6c 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -418,10 +418,9 @@ void omap_sram_idle(void) | |||
418 | 418 | ||
419 | static void omap3_pm_idle(void) | 419 | static void omap3_pm_idle(void) |
420 | { | 420 | { |
421 | local_irq_disable(); | ||
422 | local_fiq_disable(); | 421 | local_fiq_disable(); |
423 | 422 | ||
424 | if (omap_irq_pending() || need_resched()) | 423 | if (omap_irq_pending()) |
425 | goto out; | 424 | goto out; |
426 | 425 | ||
427 | trace_power_start(POWER_CSTATE, 1, smp_processor_id()); | 426 | trace_power_start(POWER_CSTATE, 1, smp_processor_id()); |
@@ -434,7 +433,6 @@ static void omap3_pm_idle(void) | |||
434 | 433 | ||
435 | out: | 434 | out: |
436 | local_fiq_enable(); | 435 | local_fiq_enable(); |
437 | local_irq_enable(); | ||
438 | } | 436 | } |
439 | 437 | ||
440 | #ifdef CONFIG_SUSPEND | 438 | #ifdef CONFIG_SUSPEND |
@@ -848,7 +846,7 @@ static int __init omap3_pm_init(void) | |||
848 | suspend_set_ops(&omap_pm_ops); | 846 | suspend_set_ops(&omap_pm_ops); |
849 | #endif /* CONFIG_SUSPEND */ | 847 | #endif /* CONFIG_SUSPEND */ |
850 | 848 | ||
851 | pm_idle = omap3_pm_idle; | 849 | arm_pm_idle = omap3_pm_idle; |
852 | omap3_idle_init(); | 850 | omap3_idle_init(); |
853 | 851 | ||
854 | /* | 852 | /* |
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c index c264ef7219c1..62d4f36c57a6 100644 --- a/arch/arm/mach-omap2/pm44xx.c +++ b/arch/arm/mach-omap2/pm44xx.c | |||
@@ -178,13 +178,11 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused) | |||
178 | */ | 178 | */ |
179 | static void omap_default_idle(void) | 179 | static void omap_default_idle(void) |
180 | { | 180 | { |
181 | local_irq_disable(); | ||
182 | local_fiq_disable(); | 181 | local_fiq_disable(); |
183 | 182 | ||
184 | omap_do_wfi(); | 183 | omap_do_wfi(); |
185 | 184 | ||
186 | local_fiq_enable(); | 185 | local_fiq_enable(); |
187 | local_irq_enable(); | ||
188 | } | 186 | } |
189 | 187 | ||
190 | /** | 188 | /** |
@@ -256,7 +254,7 @@ static int __init omap4_pm_init(void) | |||
256 | #endif /* CONFIG_SUSPEND */ | 254 | #endif /* CONFIG_SUSPEND */ |
257 | 255 | ||
258 | /* Overwrite the default arch_idle() */ | 256 | /* Overwrite the default arch_idle() */ |
259 | pm_idle = omap_default_idle; | 257 | arm_pm_idle = omap_default_idle; |
260 | 258 | ||
261 | omap4_idle_init(); | 259 | omap4_idle_init(); |
262 | 260 | ||