blob: 997e16f704adcfec696b44a33e45277e9ec69849 [file] [log] [blame]
developer5d148cb2023-06-02 13:08:11 +08001From 548735b3ae97333e3630febcf15298304aa42dcf Mon Sep 17 00:00:00 2001
2From: Sam Shih <sam.shih@mediatek.com>
3Date: Fri, 2 Jun 2023 13:06:19 +0800
4Subject: [PATCH]
5 [spi-and-storage][999-2364-spi-mediatek-fix-dma-unmap-twice.patch]
6
7---
8 drivers/spi/spi-mt65xx.c | 4 +---
9 1 file changed, 1 insertion(+), 3 deletions(-)
10
11diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
12index 871eff03f..3a8f67f1e 100644
13--- a/drivers/spi/spi-mt65xx.c
14+++ b/drivers/spi/spi-mt65xx.c
15@@ -947,12 +947,10 @@ static int mtk_spi_mem_exec_op(struct spi_mem *mem,
16 reg_val &= ~SPI_CMD_RX_DMA;
17 writel(reg_val, mdata->base + SPI_CMD_REG);
18
19+unmap_rx_dma:
20 if (op->data.dir == SPI_MEM_DATA_IN)
21 dma_unmap_single(mdata->dev, mdata->rx_dma,
22 op->data.nbytes, DMA_FROM_DEVICE);
23-unmap_rx_dma:
24- dma_unmap_single(mdata->dev, mdata->rx_dma,
25- op->data.nbytes, DMA_FROM_DEVICE);
26 unmap_tx_dma:
27 dma_unmap_single(mdata->dev, mdata->tx_dma,
28 tx_size, DMA_TO_DEVICE);
29--
302.34.1
31