summaryrefslogtreecommitdiff
path: root/src/soc/amd/common/block
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2021-05-07 15:35:10 -0600
committerMartin Roth <martinroth@google.com>2021-05-10 04:15:11 +0000
commitdcec409e95703b7a99600187e4b56c0b458114eb (patch)
tree7682efe69fd02ea7f86c0db2488df0520e24b0b4 /src/soc/amd/common/block
parent3e1943ec46d04aff01c7fc755ac371e33e7a2dcb (diff)
Revert "soc/amd/common/espi: Don't set alert pin in espi_set_initial_config"
This reverts commit 6eced03b25954e370e20e62f2cbe41f9d5626eae. 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>
Diffstat (limited to 'src/soc/amd/common/block')
-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);
}