File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -133,9 +133,7 @@ static int omap3_enter_idle(struct cpuidle_device *dev,
133
133
}
134
134
135
135
/* Execute ARM wfi */
136
- ct_cpuidle_enter ();
137
- omap_sram_idle ();
138
- ct_cpuidle_exit ();
136
+ omap_sram_idle (true);
139
137
140
138
/*
141
139
* Call idle CPU PM enter notifier chain to restore
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ static inline int omap4_idle_init(void)
29
29
30
30
extern void * omap3_secure_ram_storage ;
31
31
extern void omap3_pm_off_mode_enable (int );
32
- extern void omap_sram_idle (void );
32
+ extern void omap_sram_idle (bool rcuidle );
33
33
extern int omap_pm_clkdms_setup (struct clockdomain * clkdm , void * unused );
34
34
35
35
#if defined(CONFIG_PM_OPP )
Original file line number Diff line number Diff line change 26
26
#include <linux/delay.h>
27
27
#include <linux/slab.h>
28
28
#include <linux/of.h>
29
+ #include <linux/cpuidle.h>
29
30
30
31
#include <trace/events/power.h>
31
32
@@ -174,7 +175,7 @@ static int omap34xx_do_sram_idle(unsigned long save_state)
174
175
return 0 ;
175
176
}
176
177
177
- void omap_sram_idle (void )
178
+ void omap_sram_idle (bool rcuidle )
178
179
{
179
180
/* Variable to tell what needs to be saved and restored
180
181
* in omap_sram_idle*/
@@ -254,11 +255,18 @@ void omap_sram_idle(void)
254
255
*/
255
256
if (save_state )
256
257
omap34xx_save_context (omap3_arm_context );
258
+
259
+ if (rcuidle )
260
+ ct_cpuidle_enter ();
261
+
257
262
if (save_state == 1 || save_state == 3 )
258
263
cpu_suspend (save_state , omap34xx_do_sram_idle );
259
264
else
260
265
omap34xx_do_sram_idle (save_state );
261
266
267
+ if (rcuidle )
268
+ ct_cpuidle_exit ();
269
+
262
270
/* Restore normal SDRC POWER settings */
263
271
if (cpu_is_omap3430 () && omap_rev () >= OMAP3430_REV_ES3_0 &&
264
272
(omap_type () == OMAP2_DEVICE_TYPE_EMU ||
@@ -316,7 +324,7 @@ static int omap3_pm_suspend(void)
316
324
317
325
omap3_intc_suspend ();
318
326
319
- omap_sram_idle ();
327
+ omap_sram_idle (false );
320
328
321
329
restore :
322
330
/* Restore next_pwrsts */
You can’t perform that action at this time.
0 commit comments