summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2021-07-14 13:51:27 -0600
committerRaul Rangel <rrangel@chromium.org>2021-07-18 15:15:27 +0000
commit3af732ada0b4bcc2dce3a982f83dc4632f75f784 (patch)
treedc23cec6cdfec98ea1aa126f8ae6e442a4081574 /src
parent6f3c9018c6b830311db3a819706fc14954a5b0c2 (diff)
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 <rrangel@chromium.org> Change-Id: I9c1272bde46c3e0c15305b76c2ea7a6dde5ed0b0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56321 Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/soc/amd/common/block/lpc/spi_dma.c3
1 files changed, 3 insertions, 0 deletions
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;