From 3af732ada0b4bcc2dce3a982f83dc4632f75f784 Mon Sep 17 00:00:00 2001 From: Raul E Rangel Date: Wed, 14 Jul 2021 13:51:27 -0600 Subject: [PATCH] soc/amd/common/block/lpc/spi_dma: Yield after completing transaction There is no telling when the next udelay will be, so explicitly call `thread_yield()` after completing a transaction. This will allow any pending transactions to immediately start. BUG=b:179699789 TEST=Verify new transaction is enqueued right after another. Signed-off-by: Raul E Rangel Change-Id: I9c1272bde46c3e0c15305b76c2ea7a6dde5ed0b0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56321 Reviewed-by: Karthik Ramasubramanian Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) --- src/soc/amd/common/block/lpc/spi_dma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/soc/amd/common/block/lpc/spi_dma.c b/src/soc/amd/common/block/lpc/spi_dma.c index fdc4f32593..5c697790c8 100644 --- a/src/soc/amd/common/block/lpc/spi_dma.c +++ b/src/soc/amd/common/block/lpc/spi_dma.c @@ -193,6 +193,9 @@ static ssize_t spi_dma_readat_dma(const struct region_device *rd, void *destinat printk(BIOS_SPEW, "%s: end: dest: %p, source: %#zx, remaining: %zu\n", __func__, destination, source, transaction.remaining); + /* Allow queued up transaction to continue */ + thread_yield(); + if (transaction.remaining) return -1;