Do not try to use peci between VW_HOST_RST_WARN and VW_PLTRST_N

This commit is contained in:
Jeremy Soller
2023-03-07 09:18:54 -07:00
parent 584e397b07
commit 8228362c5d
3 changed files with 19 additions and 1 deletions

View File

@@ -1,13 +1,13 @@
// SPDX-License-Identifier: GPL-3.0-only
#include <arch/time.h>
#include <board/espi.h>
#include <board/fan.h>
#include <board/gpio.h>
#include <board/peci.h>
#include <board/power.h>
#include <common/debug.h>
#include <common/macro.h>
#include <ec/espi.h>
#include <ec/gpio.h>
#include <ec/pwm.h>
@@ -76,6 +76,10 @@ bool peci_available(void) {
if (power_state != POWER_STATE_S0)
return false;
// Currently waiting for host reset, PECI is not available
if (espi_host_reset)
return false;
// If VW_PLTRST_N virtual wire is not VWS_HIGH, PECI is not available
// This is because the CPU has not yet exited reset
if (vw_get(&VW_PLTRST_N) != VWS_HIGH)