From b39e10dbaa4024560b5faa90ad8ef14135d51d69 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Tue, 14 Jul 2020 11:08:55 -0600 Subject: soc/amd/common: Don't get eSPI address from PCI if not on x86 Exclude lpc_get_spibase() on the PSP. This also simplifies the espi_get_bar() function. BUG=b:159811539 TEST=Build & boot trembyle; Verify address in PSP & x86 Signed-off-by: Martin Roth Change-Id: I5927dd40610860b54bb35a7e5b03ddb731597745 Reviewed-on: https://review.coreboot.org/c/coreboot/+/43468 Reviewed-by: Raul Rangel Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/soc/amd/common/block/lpc/espi_util.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/soc/amd/common/block/lpc') diff --git a/src/soc/amd/common/block/lpc/espi_util.c b/src/soc/amd/common/block/lpc/espi_util.c index 3750a8b7f9..29028a4b72 100644 --- a/src/soc/amd/common/block/lpc/espi_util.c +++ b/src/soc/amd/common/block/lpc/espi_util.c @@ -19,14 +19,8 @@ void espi_update_static_bar(uintptr_t bar) static uintptr_t espi_get_bar(void) { - uintptr_t espi_spi_base; - - if (espi_bar) - return espi_bar; - - espi_spi_base = lpc_get_spibase(); - espi_update_static_bar(espi_spi_base + ESPI_OFFSET_FROM_BAR); - + if (ENV_X86 && !espi_bar) + espi_update_static_bar(lpc_get_spibase() + ESPI_OFFSET_FROM_BAR); return espi_bar; } -- cgit v1.2.3