summaryrefslogtreecommitdiffstats
path: root/payloads/linuxcheck
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2021-12-08 00:12:06 +0100
committerFelix Held <felix-coreboot@felixheld.de>2021-12-09 14:43:24 +0000
commit3d523635e8cb4614b03d7ef64f9c7a35dfbb8bcd (patch)
treea8bb54e62742798553ac8b356c995317b3b39bf0 /payloads/linuxcheck
parentb33f351a59af63e8798a9bd7425a0cd79c045aca (diff)
downloadcoreboot-3d523635e8cb4614b03d7ef64f9c7a35dfbb8bcd.tar.gz
coreboot-3d523635e8cb4614b03d7ef64f9c7a35dfbb8bcd.tar.bz2
coreboot-3d523635e8cb4614b03d7ef64f9c7a35dfbb8bcd.zip
soc/amd/stoneyridge: use common fch_spi_early_init
All SPI interface setup related functionality that Stoneyridge implemented in its southbridge code is already present in the common AMD SoC code, so use that code instead. The common fch_spi_early_init function requires the SPI controller's base address to be set, so call lpc_set_spibase(SPI_BASE_ADDRESS) right before it. fch_spi_early_init then calls lpc_enable_spi_rom and lpc_enable_spi_prefetch which can be removed from the board code now. Next it calls fch_spi_configure_4dw_burst which does the same as the now removed sb_disable_4dw_burst function when SOC_AMD_COMMON_BLOCK_SPI_4DW_BURST is set to n which is the default. This option can also only be set to y for SoCs that aren't Stoneyridge. Finally fch_spi_early_init calls fch_spi_config_modes which configures the SPI mode and speed settings according to the Kconfig settings and the settings in the amdfw part. On Kahlee this was done by calls to sb_read_mode and sb_set_spi100 before. The previous patch added the remaining Kconfig settings, so the resulting register values don't change in the non-EM100 case. In the EM100 case the TPM speed is changed from 64 to 16 MHz. TEST=Both the non-EM100 mode with a real SPI flash and the EM100 mode with a first-generation EM100 results in Google/Barla reaching the payload and the show_spi_speeds_and_modes call in bootblock prints the expected settings: relevant bootblock console output in non-EM100 case: SPI normal read speed: 33.33 MHz SPI fast read speed: 66.66 Mhz SPI alt read speed: 66.66 Mhz SPI TPM read speed: 66.66 Mhz SPI100: Enabled SPI Read Mode: Dual IO (1-2-2) relevant bootblock console output in EM100 case: SPI normal read speed: 16.66 MHz SPI fast read speed: 16.66 MHz SPI alt read speed: 16.66 MHz SPI TPM read speed: 16.66 MHz SPI100: Enabled SPI Read Mode: Normal Read (up to 33M) Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I8f37a3b040808d6a5a8e07d39b6d4a1e1981355c Reviewed-on: https://review.coreboot.org/c/coreboot/+/59968 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Diffstat (limited to 'payloads/linuxcheck')
0 files changed, 0 insertions, 0 deletions