ichspi: Use a single check to enable hwseq for PCH100+
The only difference between these blocks was the debug message printed.
Let's not be that picky and unify the code. It does not only simplify
the condition but also helps to avoid mistakes: C620 series Lewisburg
was most likely missed here earlier.
Change-Id: Ic802c6327afdea86a0f50ced53deabe8c2f36175
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/175
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/ichspi.c b/ichspi.c
index d70898b..1a2c07e 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -1987,19 +1987,8 @@
ich_spi_mode = ich_hwseq;
}
- if (ich_spi_mode == ich_auto &&
- (ich_gen == CHIPSET_100_SERIES_SUNRISE_POINT ||
- ich_gen == CHIPSET_300_SERIES_CANNON_POINT ||
- ich_gen == CHIPSET_500_SERIES_TIGER_POINT)) {
- msg_pdbg("Enabling hardware sequencing by default for 100+ series PCH.\n");
- ich_spi_mode = ich_hwseq;
- }
-
- if (ich_spi_mode == ich_auto &&
- (ich_gen == CHIPSET_APOLLO_LAKE ||
- ich_gen == CHIPSET_GEMINI_LAKE ||
- ich_gen == CHIPSET_ELKHART_LAKE)) {
- msg_pdbg("Enabling hardware sequencing by default for Apollo/Gemini/Elkhart Lake.\n");
+ if (ich_spi_mode == ich_auto && ich_gen >= SPI_ENGINE_PCH100) {
+ msg_pdbg("Enabling hardware sequencing by default for 100+ series SPI.\n");
ich_spi_mode = ich_hwseq;
}