From 0c9cc5ee3be406901a52a8151408bb13253bf39b Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Wed, 9 Apr 2014 16:04:14 -0700 Subject: 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 Original-Change-Id: I79b30455babe75a13aac827caac88bf7053ec9e4 Original-Reviewed-on: https://chromium-review.googlesource.com/194479 Original-Tested-by: David Hendricks Original-Reviewed-by: Gabe Black Original-Commit-Queue: David Hendricks (cherry picked from commit dc7dc1d25bd88873b4c1198a6f3723d27c914ddc) Signed-off-by: Marc Jones Change-Id: I8c5da4e104328fd8bce71942e6eda458a37bfe06 Reviewed-on: http://review.coreboot.org/7761 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/soc/nvidia/tegra124/spi.c | 2 ++ 1 file changed, 2 insertions(+) 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)) { -- cgit v1.2.3