File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -111,15 +111,18 @@ int soc_s2ram_suspend(pm_s2ram_system_off_fn_t system_off)
111111{
112112 int ret ;
113113
114+ __disable_irq ();
114115 nvic_suspend (& backup_data .nvic_context );
115116 mpu_suspend (& backup_data .mpu_context );
116117 ret = arch_pm_s2ram_suspend (system_off );
117118 if (ret < 0 ) {
119+ __enable_irq ();
118120 return ret ;
119121 }
120122
121123 mpu_resume (& backup_data .mpu_context );
122124 nvic_resume (& backup_data .nvic_context );
125+ __enable_irq ();
123126
124127 return ret ;
125128}
Original file line number Diff line number Diff line change @@ -188,19 +188,15 @@ static void s2ram_enter(void)
188188void pm_state_set (enum pm_state state , uint8_t substate_id )
189189{
190190 if (state == PM_STATE_SUSPEND_TO_IDLE ) {
191- __disable_irq ();
192191 s2idle_enter (substate_id );
193192 /* Resume here. */
194193 s2idle_exit (substate_id );
195- __enable_irq ();
196194 }
197195#if defined(CONFIG_PM_S2RAM )
198196 else if (state == PM_STATE_SUSPEND_TO_RAM ) {
199- __disable_irq ();
200197 s2ram_enter ();
201198 /* On resuming or error we return exactly *HERE* */
202199 s2ram_exit ();
203- __enable_irq ();
204200 }
205201#endif
206202 else {
You can’t perform that action at this time.
0 commit comments