soc/amd/common/block/spi/fch_spi_util.c: Fix read with invalid length

Fix function call to invoke 16-bit read in 16-bit api instead of 8-bit read.

Signed-off-by: Igor Bagnucki <bagnucki02@gmail.com>
Change-Id: Ifd9079fc6446125e0e58402fdb64bc198bb8e381
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45374
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
This commit is contained in:
Igor Bagnucki 2020-09-14 22:04:34 +02:00 committed by Patrick Georgi
parent 362a156867
commit 9cd8afdc3c
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ uint8_t spi_read8(uint8_t reg)
uint16_t spi_read16(uint8_t reg) uint16_t spi_read16(uint8_t reg)
{ {
return read8((void *)(spi_get_bar() + reg)); return read16((void *)(spi_get_bar() + reg));
} }
uint32_t spi_read32(uint8_t reg) uint32_t spi_read32(uint8_t reg)