Skip to content

Commit 2dd7da7

Browse files
Josh-Tsaiamstan
authored andcommitted
fwk: minipc-diagnostic: don't run the diagnostic if no HW/SW error
EC will turn off the PSU power when the system shutdown or enters standby mode. In this case, EC calls the diagnostic_power_glitch_detect() and run the diagnostic. EC shouldn't execute the diagnostic if there is no HW or SW error, so EC needs to clear the variable "run diagnostics" to ensure diagnostic is stopped BRANCH=fwk-dogwood-27111 BUG=diagnostic will be executed if the system enters standby mode BUG=diagnostic will be executed if the system does the normal shutdown TEST=EC does not print the diagnostic log if the system enters standby mode or does the normal shutdown after 90s. Signed-off-by: Josh Tsai <Josh_Tsai@compal.com>
1 parent 00220bf commit 2dd7da7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

zephyr/program/framework/src/diagnostics_minipc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,10 @@ static bool diagnostics_tick(void)
147147
return false;
148148

149149
/* Everything is ok after minimum 90 seconds of checking */
150-
if (bios_diagnostic_is_completed && hw_diagnostics == 0)
150+
if (bios_diagnostic_is_completed && hw_diagnostics == 0) {
151+
run_diagnostics = 0;
151152
return false;
153+
}
152154

153155
if (diagnostics_ctr == DIAGNOSTICS_START ||
154156
diagnostics_ctr == DIAGNOSTICS_HW_FINISH) {

0 commit comments

Comments
 (0)