summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-04-15 12:59:42 +0200
committerFelix Singer <felixsinger@posteo.net>2022-09-29 17:04:53 +0000
commit399a4dd721a64a1d22e2f8028cc39d6496515ed6 (patch)
tree6a40ff5ca048148294b209d8cb99ab9558fdc44f
parentb57f48f77f367c43cd83878d92aa55de151c0798 (diff)
downloadflashrom-399a4dd721a64a1d22e2f8028cc39d6496515ed6.tar.gz
flashrom-399a4dd721a64a1d22e2f8028cc39d6496515ed6.tar.bz2
flashrom-399a4dd721a64a1d22e2f8028cc39d6496515ed6.zip
chipset_enable.c: Disable SPI on ICH7 if booted from LPC
Commit 92d6a86 ("Refactor Intel Chipset Enables") eliminated a check to disable SPI when ICH7 has booted from LPC, as the hardware does not support it. Therefore, when flashrom probes the SPI bus, it times out waiting for the hardware to react, for each and every SPI flash chip. This results in very long delays and countless instances of the error: Error: SCIP never cleared! To prevent this, bring back part of the lost check. Probing for LPC and FWH when booted from SPI does not seem to cause any problems on desktop mainboards with ICH7, so don't disable LPC nor FWH if that is the case. Tested on ECS 945G-M4 (ICH7, boots from LPC), works without errors. Change-Id: I5e59e66a2dd16b07f2dca410997fce38ab9c8fd1 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/40401 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/flashrom/+/67863 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Felix Singer <felixsinger@posteo.net>
-rw-r--r--chipset_enable.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/chipset_enable.c b/chipset_enable.c
index 84e4b6b5c..0dfe26756 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -757,6 +757,14 @@ static int enable_flash_ich_spi(struct pci_dev *dev, enum ich_chipset ich_genera
if (ret_fwh == ERROR_FATAL)
return ret_fwh;
+ /*
+ * It seems that the ICH7 does not support SPI and LPC chips at the same time. When booted
+ * from LPC, the SCIP bit will never clear, which causes long delays and many error messages.
+ * To avoid this, we will not enable SPI on ICH7 when the southbridge is strapped to LPC.
+ */
+ if (ich_generation == CHIPSET_ICH7 && (boot_buses & BUS_LPC))
+ return 0;
+
/* SPIBAR is at RCRB+0x3020 for ICH[78], Tunnel Creek and Centerton, and RCRB+0x3800 for ICH9. */
uint16_t spibar_offset;
switch (ich_generation) {