diff options
Diffstat (limited to 'src/mainboard/google/skyrim')
-rw-r--r-- | src/mainboard/google/skyrim/Kconfig | 16 | ||||
-rw-r--r-- | src/mainboard/google/skyrim/Makefile.inc | 2 | ||||
-rw-r--r-- | src/mainboard/google/skyrim/spi_speeds.c | 13 |
3 files changed, 31 insertions, 0 deletions
diff --git a/src/mainboard/google/skyrim/Kconfig b/src/mainboard/google/skyrim/Kconfig index 87cf6e43a5..0bc9ea981c 100644 --- a/src/mainboard/google/skyrim/Kconfig +++ b/src/mainboard/google/skyrim/Kconfig @@ -126,4 +126,20 @@ config ALT_SPI_SPEED endif # !EM100 +config OVERRIDE_EFS_SPI_SPEED + int + default 3 if EM100 + default 4 # 100MHz + help + Override EFS SPI Speed Configuration to be applied based on certain + board version. + +config OVERRIDE_EFS_SPI_SPEED_MIN_BOARD + hex + default 0x5 if BOARD_GOOGLE_SKYRIM + default 0xffffffff + help + Minimum board version starting which the Override EFS SPI Speed + configuration has to be applied. + endif # BOARD_GOOGLE_BASEBOARD_SKYRIM diff --git a/src/mainboard/google/skyrim/Makefile.inc b/src/mainboard/google/skyrim/Makefile.inc index ba175a2376..a594ceb518 100644 --- a/src/mainboard/google/skyrim/Makefile.inc +++ b/src/mainboard/google/skyrim/Makefile.inc @@ -10,6 +10,8 @@ ramstage-$(CONFIG_CHROMEOS) += chromeos.c verstage-$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK) += verstage.c +all-y += spi_speeds.c + subdirs-y += variants/baseboard subdirs-y += variants/$(VARIANT_DIR) diff --git a/src/mainboard/google/skyrim/spi_speeds.c b/src/mainboard/google/skyrim/spi_speeds.c new file mode 100644 index 0000000000..857e02d900 --- /dev/null +++ b/src/mainboard/google/skyrim/spi_speeds.c @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <amdblocks/spi.h> +#include <boardid.h> +#include <stdint.h> + +void mainboard_spi_fast_speed_override(uint8_t *fast_speed) +{ + uint32_t board_ver = board_id(); + + if (board_ver >= CONFIG_OVERRIDE_EFS_SPI_SPEED_MIN_BOARD) + *fast_speed = CONFIG_OVERRIDE_EFS_SPI_SPEED; +} |