Skip to content

Commit baa1d3b

Browse files
Josh-Tsaikiram9
authored andcommitted
fwk: azalea: should reset the diagnostic when power on the system
EC should reset the diagnostic wheh pressing the power button to power on the system. The current EC code only resets the diagnostic when the chipset state in G3. This change adds the condition to reset the diagnostic if the chipset state is S5. (Refer commit a8237eb60281d5d90c7557068db5b32df9a5c40d) BRANCH=fwk-main BUG=https://app.clickup.com/t/86eu0bmgj TEST=Boot into BIOS setup menu and press power button to shutdown the system. The multifunctional LEDs do not blink the diagnostic. TEST=Remove the c cover and press the power button to power on the system 1. Power on from G3 and wait for 90s. The multifunctional LEDs start blinking the diagnostic 2. Power on from S5 and wait for 90s. The multifunctional LEDs start blinking the diagnostic Signed-off-by: Josh Tsai <[email protected]>
1 parent bd76593 commit baa1d3b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

zephyr/program/framework/azalea/src/power_button_x86.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,18 @@ static void state_machine(uint64_t tnow)
305305
tnext_state = tnow + PWRBTN_DELAY_T0;
306306
pwrbtn_state = PWRBTN_STATE_T0;
307307
set_pwrbtn_to_pch(0, 0);
308-
cancel_diagnostics();
308+
if (chipset_in_state(CHIPSET_STATE_ON)) {
309+
/**
310+
* System in EFI mode (S0), press power button to shutdown
311+
* the system and cancel the diagnostics.
312+
*/
313+
cancel_diagnostics();
314+
} else if (chipset_in_state(CHIPSET_STATE_SOFT_OFF))
315+
/**
316+
* System in S5 state, press power button to start up the
317+
* system and reset the diagnostics.
318+
*/
319+
reset_diagnostics();
309320
}
310321
}
311322
break;

0 commit comments

Comments
 (0)