summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/soc/amd/cezanne/early_fch.c8
-rw-r--r--src/soc/amd/common/block/include/amdblocks/espi.h8
-rw-r--r--src/soc/amd/picasso/early_fch.c7
3 files changed, 13 insertions, 10 deletions
diff --git a/src/soc/amd/cezanne/early_fch.c b/src/soc/amd/cezanne/early_fch.c
index f97f57c846..f06d5767e9 100644
--- a/src/soc/amd/cezanne/early_fch.c
+++ b/src/soc/amd/cezanne/early_fch.c
@@ -40,8 +40,12 @@ void fch_pre_init(void)
enable_acpimmio_decode_pm04();
/* Setup SPI base by calling lpc_early_init before setting up eSPI. */
lpc_early_init();
- /* Setup eSPI to enable port80 routing. */
- configure_espi_with_mb_hook();
+
+ /* Setup eSPI to enable port80 routing if the board is using eSPI and the eSPI
+ interface hasn't already been set up in verstage on PSP */
+ if (CONFIG(SOC_AMD_COMMON_BLOCK_USE_ESPI) && !CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK))
+ configure_espi_with_mb_hook();
+
fch_spi_early_init();
fch_smbus_init();
fch_enable_cf9_io();
diff --git a/src/soc/amd/common/block/include/amdblocks/espi.h b/src/soc/amd/common/block/include/amdblocks/espi.h
index 0f8066b2a6..e12b1b8486 100644
--- a/src/soc/amd/common/block/include/amdblocks/espi.h
+++ b/src/soc/amd/common/block/include/amdblocks/espi.h
@@ -134,12 +134,8 @@ void mb_set_up_early_espi(void);
/* Setup eSPI with any mainboard specific initialization. */
static inline void configure_espi_with_mb_hook(void)
{
- /* If eSPI is setup in PSP Verstage, continue with that. Else setup eSPI to perform
- port80h routing as early as possible. */
- if (!CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK) && CONFIG(SOC_AMD_COMMON_BLOCK_USE_ESPI)) {
- mb_set_up_early_espi();
- espi_setup();
- }
+ mb_set_up_early_espi();
+ espi_setup();
}
#endif /* AMD_BLOCK_ESPI_H */
diff --git a/src/soc/amd/picasso/early_fch.c b/src/soc/amd/picasso/early_fch.c
index 83b4ae4579..2a1b5c971a 100644
--- a/src/soc/amd/picasso/early_fch.c
+++ b/src/soc/amd/picasso/early_fch.c
@@ -47,8 +47,11 @@ void fch_pre_init(void)
enable_acpimmio_decode_pm04();
/* Setup SPI base by calling lpc_early_init before setting up eSPI. */
lpc_early_init();
- /* Setup eSPI to enable port80 routing. */
- configure_espi_with_mb_hook();
+
+ /* Setup eSPI to enable port80 routing if the board is using eSPI and the eSPI
+ interface hasn't already been set up in verstage on PSP */
+ if (CONFIG(SOC_AMD_COMMON_BLOCK_USE_ESPI) && !CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK))
+ configure_espi_with_mb_hook();
if (!CONFIG(SOC_AMD_COMMON_BLOCK_USE_ESPI))
lpc_configure_decodes();