File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
soc/xtensa/intel_adsp/ace Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,8 @@ void pm_state_set(enum pm_state state, uint8_t substate_id)
243
243
core_desc [cpu ].intenable = XTENSA_RSR ("INTENABLE" );
244
244
z_xt_ints_off (0xffffffff );
245
245
246
- if (state == PM_STATE_SOFT_OFF ) {
246
+ switch (state ) {
247
+ case PM_STATE_SOFT_OFF :
247
248
core_desc [cpu ].bctl = DSPCS .bootctl [cpu ].bctl ;
248
249
DSPCS .bootctl [cpu ].bctl &= ~DSPBR_BCTL_WAITIPCG ;
249
250
if (cpu == 0 ) {
@@ -307,7 +308,8 @@ void pm_state_set(enum pm_state state, uint8_t substate_id)
307
308
} else {
308
309
power_gate_entry (cpu );
309
310
}
310
- } else if (state == PM_STATE_RUNTIME_IDLE ) {
311
+ break ;
312
+ case PM_STATE_RUNTIME_IDLE :
311
313
DSPCS .bootctl [cpu ].bctl &= ~DSPBR_BCTL_WAITIPPG ;
312
314
DSPCS .bootctl [cpu ].bctl &= ~DSPBR_BCTL_WAITIPCG ;
313
315
soc_cpu_power_down (cpu );
@@ -321,7 +323,8 @@ void pm_state_set(enum pm_state state, uint8_t substate_id)
321
323
ret = pm_device_runtime_put (INTEL_ADSP_HST_DOMAIN_DEV );
322
324
__ASSERT_NO_MSG (ret == 0 );
323
325
power_gate_entry (cpu );
324
- } else {
326
+ break ;
327
+ default :
325
328
__ASSERT (false, "invalid argument - unsupported power state" );
326
329
}
327
330
}
You can’t perform that action at this time.
0 commit comments