summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Bagnucki <bagnucki02@gmail.com>2020-09-14 22:04:34 +0200
committerPatrick Georgi <pgeorgi@google.com>2020-09-21 08:11:29 +0000
commit9cd8afdc3ce7df24d6dd233a08974530ed3e1f50 (patch)
tree61e809c5cd1c6e7abb461b14884b08fdb51449a2 /src
parent362a1568670851cf25117d5660504dfb1d1b6331 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/soc/amd/common/block/spi/fch_spi_util.c2
1 files changed, 1 insertions, 1 deletions
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)