From 1fcc9f3125f88595a89392e9736ebb01e7788842 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Mon, 29 Jan 2018 11:30:17 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/23491 Reviewed-by: Furquan Shaikh Reviewed-by: Justin TerAvest Tested-by: build bot (Jenkins) --- src/soc/amd/stoneyridge/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/soc/amd/stoneyridge') diff --git a/src/soc/amd/stoneyridge/spi.c b/src/soc/amd/stoneyridge/spi.c index 311cd37483..9889727f06 100644 --- a/src/soc/amd/stoneyridge/spi.c +++ b/src/soc/amd/stoneyridge/spi.c @@ -193,7 +193,7 @@ static const struct spi_ctrlr spi_ctrlr = { .xfer = spi_ctrlr_xfer, .xfer_vector = spi_xfer_two_vectors, .max_xfer_size = SPI_FIFO_DEPTH, - .deduct_cmd_len = true, + .flags = SPI_CNTRLR_DEDUCT_CMD_LEN, }; const struct spi_ctrlr_buses spi_ctrlr_bus_map[] = { -- cgit v1.2.3