summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hendricks <dhendrix@chromium.org>2014-04-09 16:04:14 -0700
committerMarc Jones <marc.jones@se-eng.com>2014-12-15 20:17:25 +0100
commit0c9cc5ee3be406901a52a8151408bb13253bf39b (patch)
tree5f4c5e05f808f8f4c6b3596da32541782e221872
parent044656374780f844dd06487bfc654d8c8604b385 (diff)
downloadcoreboot-0c9cc5ee3be406901a52a8151408bb13253bf39b.tar.xz
tegra124: Release DMA channel at end of transaction
This adds a missing dma_release() at the end of DMA transfers. It probably doesn't matter since we don't do many DMA transfers, though I wouldn't want to hit some corner case with EFS and eventlog. BUG=none BRANCH=none TEST=tested on nyan Signed-off-by: David Hendricks <dhendrix@chromium.org> Original-Change-Id: I79b30455babe75a13aac827caac88bf7053ec9e4 Original-Reviewed-on: https://chromium-review.googlesource.com/194479 Original-Tested-by: David Hendricks <dhendrix@chromium.org> Original-Reviewed-by: Gabe Black <gabeblack@chromium.org> Original-Commit-Queue: David Hendricks <dhendrix@chromium.org> (cherry picked from commit dc7dc1d25bd88873b4c1198a6f3723d27c914ddc) Signed-off-by: Marc Jones <marc.jones@se-eng.com> Change-Id: I8c5da4e104328fd8bce71942e6eda458a37bfe06 Reviewed-on: http://review.coreboot.org/7761 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rw-r--r--src/soc/nvidia/tegra124/spi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/soc/nvidia/tegra124/spi.c b/src/soc/nvidia/tegra124/spi.c
index ea7b6ce1cb..8e090aab39 100644
--- a/src/soc/nvidia/tegra124/spi.c
+++ b/src/soc/nvidia/tegra124/spi.c
@@ -561,6 +561,7 @@ static int tegra_spi_dma_finish(struct tegra_spi_channel *spi)
; /* this shouldn't take long, no udelay */
dma_stop(spi->dma_in);
clrbits_le32(&spi->regs->command1, SPI_CMD1_RX_EN);
+ dma_release(spi->dma_in);
}
if (spi->dma_out) {
@@ -569,6 +570,7 @@ static int tegra_spi_dma_finish(struct tegra_spi_channel *spi)
spi_delay(spi, todo - spi_byte_count(spi));
clrbits_le32(&spi->regs->command1, SPI_CMD1_TX_EN);
dma_stop(spi->dma_out);
+ dma_release(spi->dma_out);
}
if (fifo_error(spi)) {