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>
This commit is contained in:
Felix Held 2020-06-04 19:39:30 +02:00 committed by Felix Held
parent 466374924c
commit 017ec16588
1 changed files with 2 additions and 1 deletions

View File

@ -55,7 +55,8 @@ enum spi100_speed {
#define SPI_RD4DW_EN_HOST BIT(15) #define SPI_RD4DW_EN_HOST BIT(15)
#define SPI_FIFO 0x80 #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 { struct spi_config {
/* /*