From 017ec1658833c38a0cdcf5e170bc3a9dfb5f38bd Mon Sep 17 00:00:00 2001 From: Felix Held Date: Thu, 4 Jun 2020 19:39:30 +0200 Subject: [PATCH] soc/amd/common/spi: add and use define for last FIFO position The existing define for SPI_FIFO_DEPTH looked a bit suspicious, but turned out to be correct. Change-Id: I91e65d922673f5c451a336ae013cb75f87a3fc98 Signed-off-by: Felix Held Reviewed-on: https://review.coreboot.org/c/coreboot/+/42076 Reviewed-by: Aaron Durbin Reviewed-by: Furquan Shaikh Reviewed-by: Raul Rangel Tested-by: build bot (Jenkins) --- src/soc/amd/common/block/include/amdblocks/spi.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/soc/amd/common/block/include/amdblocks/spi.h b/src/soc/amd/common/block/include/amdblocks/spi.h index fec099dc6a..d226e0c05d 100644 --- a/src/soc/amd/common/block/include/amdblocks/spi.h +++ b/src/soc/amd/common/block/include/amdblocks/spi.h @@ -55,7 +55,8 @@ enum spi100_speed { #define SPI_RD4DW_EN_HOST BIT(15) #define SPI_FIFO 0x80 -#define SPI_FIFO_DEPTH (0xc7 - SPI_FIFO) +#define SPI_FIFO_LAST_BYTE 0xc7 +#define SPI_FIFO_DEPTH (SPI_FIFO_LAST_BYTE - SPI_FIFO) struct spi_config { /*