Revert "soc/amd/common/espi: Don't set alert pin in espi_set_initial_config"

This reverts commit 6eced03b25.

This prevents zork from booting. We get the following error:
eSPI cmd0-cmd2: 00080009 00000000 00000000 data: 00000000.
Error: unexpected eSPI status register bits set (Status = 0x10000010)
Error: Slave GET_CONFIGURATION failed!

This isn't a pure revert. It is more of a fix that keeps the old
behavior.

BUG=b:187122344
TEST=Boot zork an no longer see eSPI error

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: If75a35d3994b0fd23945a450032d3cc81abeb136
Reviewed-on: https://review.coreboot.org/c/coreboot/+/53932
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Raul E Rangel 2021-05-07 15:35:10 -06:00 committed by Martin Roth
parent 3e1943ec46
commit dcec409e95
1 changed files with 11 additions and 0 deletions

View File

@ -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; 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); espi_write32(ESPI_SLAVE0_CONFIG, espi_initial_mode);
} }