sb/intel/i82801gx: Only include SPI code with SPI boot devices

On devices lacking SPI boot devices there is a hefty timeout
penalty on probing for flash chips and this code would not
be useful anyway.

Change-Id: I0bec11372ef54c1e1e611b81f7013932257f4ca6
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36868
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Arthur Heymans 2019-11-15 19:19:53 +01:00 committed by Patrick Georgi
parent e5ca52bbba
commit 767de0aac7
2 changed files with 3 additions and 2 deletions

View File

@ -23,7 +23,7 @@ config SOUTHBRIDGE_INTEL_I82801GX
select COMMON_FADT
select SOUTHBRIDGE_INTEL_COMMON_GPIO
select SOUTHBRIDGE_INTEL_COMMON_SMBUS
select SOUTHBRIDGE_INTEL_COMMON_SPI
select SOUTHBRIDGE_INTEL_COMMON_SPI if BOOT_DEVICE_SPI_FLASH
select SOUTHBRIDGE_INTEL_COMMON_PMCLIB
select SOUTHBRIDGE_INTEL_COMMON_PMBASE
select HAVE_INTEL_CHIPSET_LOCKDOWN

View File

@ -616,7 +616,8 @@ static void lpc_final(struct device *dev)
if (!CONFIG(INTEL_CHIPSET_LOCKDOWN))
return;
spi_finalize_ops();
if (CONFIG(BOOT_DEVICE_SPI_FLASH))
spi_finalize_ops();
/* Lock SPIBAR */
SPIBAR16(0) = SPIBAR16(0) | (1 << 15);