diff options
author | Aaron Durbin <adurbin@chromium.org> | 2018-01-29 11:30:17 -0700 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2018-01-30 05:37:47 +0000 |
commit | 1fcc9f3125f88595a89392e9736ebb01e7788842 (patch) | |
tree | 998555b6275b5b22e6e73f14ff2baab99841b32c /src/southbridge/amd | |
parent | 3c0d7cfb947d12bdadc5d1898d23d29c93e0ec03 (diff) | |
download | coreboot-1fcc9f3125f88595a89392e9736ebb01e7788842.tar.xz |
drivers/spi: support cmd opcode deduction for spi_crop_chunk()
spi_crop_chunk() currently supports deducting the command length
when determining maximum payload size in a transaction. Add support
for deducting just the opcode part of the command by replacing
deduct_cmd_len field to generic flags field. The two enums supported
drive the logic within spi_crop_chunk():
SPI_CNTRLR_DEDUCT_CMD_LEN
SPI_CNTRLR_DEDUCT_OPCODE_LEN
All existing users of deduct_cmd_len were converted to using the
flags field.
BUG=b:65485690
Change-Id: I771fba684f0ed76ffdc8573aa10f775070edc691
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/23491
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/southbridge/amd')
-rw-r--r-- | src/southbridge/amd/agesa/hudson/spi.c | 2 | ||||
-rw-r--r-- | src/southbridge/amd/cimx/sb800/spi.c | 2 | ||||
-rw-r--r-- | src/southbridge/amd/sb700/spi.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/southbridge/amd/agesa/hudson/spi.c b/src/southbridge/amd/agesa/hudson/spi.c index 46121db752..379594e0a3 100644 --- a/src/southbridge/amd/agesa/hudson/spi.c +++ b/src/southbridge/amd/agesa/hudson/spi.c @@ -164,7 +164,7 @@ static const struct spi_ctrlr spi_ctrlr = { .xfer = spi_ctrlr_xfer, .xfer_vector = spi_xfer_two_vectors, .max_xfer_size = AMD_SB_SPI_TX_LEN, - .deduct_cmd_len = true, + .flags = SPI_CNTRLR_DEDUCT_CMD_LEN, }; const struct spi_ctrlr_buses spi_ctrlr_bus_map[] = { diff --git a/src/southbridge/amd/cimx/sb800/spi.c b/src/southbridge/amd/cimx/sb800/spi.c index f2d62144ee..ba3f643b73 100644 --- a/src/southbridge/amd/cimx/sb800/spi.c +++ b/src/southbridge/amd/cimx/sb800/spi.c @@ -155,7 +155,7 @@ static const struct spi_ctrlr spi_ctrlr = { .xfer = spi_ctrlr_xfer, .xfer_vector = spi_xfer_two_vectors, .max_xfer_size = AMD_SB_SPI_TX_LEN, - .deduct_cmd_len = true, + .flags = SPI_CNTRLR_DEDUCT_CMD_LEN, }; const struct spi_ctrlr_buses spi_ctrlr_bus_map[] = { diff --git a/src/southbridge/amd/sb700/spi.c b/src/southbridge/amd/sb700/spi.c index caddfc88c0..6df47fd309 100644 --- a/src/southbridge/amd/sb700/spi.c +++ b/src/southbridge/amd/sb700/spi.c @@ -112,7 +112,7 @@ static const struct spi_ctrlr spi_ctrlr = { .xfer = spi_ctrlr_xfer, .xfer_vector = spi_xfer_two_vectors, .max_xfer_size = AMD_SB_SPI_TX_LEN, - .deduct_cmd_len = true, + .flags = SPI_CNTRLR_DEDUCT_CMD_LEN, }; const struct spi_ctrlr_buses spi_ctrlr_bus_map[] = { |