soc/amd: make configure_espi_with_mb_hook call conditional
If a system doesn't use eSPI or has the eSPI interface already configured in verstage on PSP, not calling configure_espi_with_mb_hook from fch_pre_init makes it a bit more obvious that the eSPI interface initialization will be skipped. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Ia77b83d56a5dab1bac6cfbbd92d33aa60a9e8b89 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58339 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
This commit is contained in:
parent
f38fbbec2c
commit
4e379a2374
|
@ -40,8 +40,12 @@ void fch_pre_init(void)
|
||||||
enable_acpimmio_decode_pm04();
|
enable_acpimmio_decode_pm04();
|
||||||
/* Setup SPI base by calling lpc_early_init before setting up eSPI. */
|
/* Setup SPI base by calling lpc_early_init before setting up eSPI. */
|
||||||
lpc_early_init();
|
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_spi_early_init();
|
||||||
fch_smbus_init();
|
fch_smbus_init();
|
||||||
fch_enable_cf9_io();
|
fch_enable_cf9_io();
|
||||||
|
|
|
@ -134,12 +134,8 @@ void mb_set_up_early_espi(void);
|
||||||
/* Setup eSPI with any mainboard specific initialization. */
|
/* Setup eSPI with any mainboard specific initialization. */
|
||||||
static inline void configure_espi_with_mb_hook(void)
|
static inline void configure_espi_with_mb_hook(void)
|
||||||
{
|
{
|
||||||
/* If eSPI is setup in PSP Verstage, continue with that. Else setup eSPI to perform
|
mb_set_up_early_espi();
|
||||||
port80h routing as early as possible. */
|
espi_setup();
|
||||||
if (!CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK) && CONFIG(SOC_AMD_COMMON_BLOCK_USE_ESPI)) {
|
|
||||||
mb_set_up_early_espi();
|
|
||||||
espi_setup();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* AMD_BLOCK_ESPI_H */
|
#endif /* AMD_BLOCK_ESPI_H */
|
||||||
|
|
|
@ -47,8 +47,11 @@ void fch_pre_init(void)
|
||||||
enable_acpimmio_decode_pm04();
|
enable_acpimmio_decode_pm04();
|
||||||
/* Setup SPI base by calling lpc_early_init before setting up eSPI. */
|
/* Setup SPI base by calling lpc_early_init before setting up eSPI. */
|
||||||
lpc_early_init();
|
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))
|
if (!CONFIG(SOC_AMD_COMMON_BLOCK_USE_ESPI))
|
||||||
lpc_configure_decodes();
|
lpc_configure_decodes();
|
||||||
|
|
Loading…
Reference in New Issue