summaryrefslogtreecommitdiff
path: root/src/soc/amd
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/amd')
-rw-r--r--src/soc/amd/common/block/include/amdblocks/spi.h1
-rw-r--r--src/soc/amd/common/block/spi/fch_spi.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/include/amdblocks/spi.h b/src/soc/amd/common/block/include/amdblocks/spi.h
index eaea0f79c9..35a3782f7a 100644
--- a/src/soc/amd/common/block/include/amdblocks/spi.h
+++ b/src/soc/amd/common/block/include/amdblocks/spi.h
@@ -117,4 +117,5 @@ void spi_write16(uint8_t reg, uint16_t val);
void spi_write32(uint8_t reg, uint32_t val);
void fch_spi_config_modes(void);
+void mainboard_spi_fast_speed_override(uint8_t *fast_speed);
#endif /* AMD_BLOCK_SPI_H */
diff --git a/src/soc/amd/common/block/spi/fch_spi.c b/src/soc/amd/common/block/spi/fch_spi.c
index 51787fae92..fad8cd9951 100644
--- a/src/soc/amd/common/block/spi/fch_spi.c
+++ b/src/soc/amd/common/block/spi/fch_spi.c
@@ -50,6 +50,11 @@ void show_spi_speeds_and_modes(void)
printk(BIOS_DEBUG, "SPI Read Mode: %s\n", read_mode_str[DECODE_SPI_READ_MODE(val32)]);
}
+void __weak mainboard_spi_fast_speed_override(uint8_t *fast_speed)
+{
+ /* No overriding SPI speeds. */
+}
+
static uint8_t lower_speed(uint8_t speed1, uint8_t speed2)
{
uint8_t speeds[] = {SPI_SPEED_800K, SPI_SPEED_16M, SPI_SPEED_22M,
@@ -102,6 +107,7 @@ void fch_spi_config_modes(void)
read_mode = CONFIG_EFS_SPI_READ_MODE;
fast_speed = CONFIG_EFS_SPI_SPEED;
}
+ mainboard_spi_fast_speed_override(&fast_speed);
if (fast_speed != CONFIG_EFS_SPI_SPEED) {
normal_speed = lower_speed(normal_speed, fast_speed);