summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/soc/amd/common/block/lpc/espi_util.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/lpc/espi_util.c b/src/soc/amd/common/block/lpc/espi_util.c
index 81056b0222..276bb3cdc3 100644
--- a/src/soc/amd/common/block/lpc/espi_util.c
+++ b/src/soc/amd/common/block/lpc/espi_util.c
@@ -883,6 +883,17 @@ static void espi_set_initial_config(const struct espi_config *mb_cfg)
{
uint32_t espi_initial_mode = ESPI_OP_FREQ_16_MHZ | ESPI_IO_MODE_SINGLE;
+ switch (mb_cfg->alert_pin) {
+ case ESPI_ALERT_PIN_IN_BAND:
+ break;
+ case ESPI_ALERT_PIN_PUSH_PULL:
+ case ESPI_ALERT_PIN_OPEN_DRAIN:
+ espi_initial_mode |= ESPI_ALERT_MODE;
+ break;
+ default:
+ die("Unknown espi alert config: %u!\n", mb_cfg->alert_pin);
+ }
+
espi_write32(ESPI_SLAVE0_CONFIG, espi_initial_mode);
}