summaryrefslogtreecommitdiff
path: root/src/soc/amd/common
diff options
context:
space:
mode:
authorFelix Held <felix.held@amd.corp-partner.google.com>2020-06-04 19:39:30 +0200
committerFelix Held <felix-coreboot@felixheld.de>2020-06-05 19:51:47 +0000
commit017ec1658833c38a0cdcf5e170bc3a9dfb5f38bd (patch)
tree69ee11360850c0d28e9fc5e0ef6bfd20778e400c /src/soc/amd/common
parent466374924ccfc3c1306ca030b62d1de5ba3a1fba (diff)
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 <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/42076 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/common')
-rw-r--r--src/soc/amd/common/block/include/amdblocks/spi.h3
1 files changed, 2 insertions, 1 deletions
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 {
/*