blob: 52dcca8de288f1f47a5a7991ff62d2d2eddc9609 [file] [log] [blame]
Furquan Shaikhb13bd1e2020-09-21 22:44:27 +00001/* SPDX-License-Identifier: GPL-2.0-or-later */
2
3#include <device/device.h>
4#include <device/pci_def.h>
5#include <device/pci_ops.h>
6#include <soc/heci.h>
7#include <soc/pci_devs.h>
8
9uint32_t heci_fw_sts(void)
10{
11 return pci_read_config32(PCH_DEV_CSE, REG_SEC_FW_STS0);
12}
13
14bool heci_cse_normal(void)
15{
16 return ((heci_fw_sts() & MASK_SEC_STATUS) == SEC_STATE_NORMAL);
17}
18
19bool heci_cse_done(void)
20{
21 return (!!(heci_fw_sts() & MASK_SEC_FIRMWARE_COMPLETE));
22}