From 9cd8afdc3ce7df24d6dd233a08974530ed3e1f50 Mon Sep 17 00:00:00 2001 From: Igor Bagnucki Date: Mon, 14 Sep 2020 22:04:34 +0200 Subject: 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 Change-Id: Ifd9079fc6446125e0e58402fdb64bc198bb8e381 Reviewed-on: https://review.coreboot.org/c/coreboot/+/45374 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones Reviewed-by: Martin Roth Reviewed-by: Marshall Dawson --- src/soc/amd/common/block/spi/fch_spi_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/soc') diff --git a/src/soc/amd/common/block/spi/fch_spi_util.c b/src/soc/amd/common/block/spi/fch_spi_util.c index 7bac99191a..5cef565baf 100644 --- a/src/soc/amd/common/block/spi/fch_spi_util.c +++ b/src/soc/amd/common/block/spi/fch_spi_util.c @@ -29,7 +29,7 @@ uint8_t spi_read8(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) -- cgit v1.2.3