Skip to content

Commit 41687a5

Browse files
committed
Merge tag 'spi-fix-v6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi fix from Mark Brown: "One fix here from Thierry, fixing crashes caused by attempting to do cache sync operations on uncached memory on Tegra platforms" * tag 'spi-fix-v6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: tegra210-qspi: Remove cache operations
2 parents e099023 + d57e92d commit 41687a5

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

drivers/spi/spi-tegra210-quad.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,6 @@ tegra_qspi_read_rx_fifo_to_client_rxbuf(struct tegra_qspi *tqspi, struct spi_tra
407407
static void
408408
tegra_qspi_copy_client_txbuf_to_qspi_txbuf(struct tegra_qspi *tqspi, struct spi_transfer *t)
409409
{
410-
dma_sync_single_for_cpu(tqspi->dev, tqspi->tx_dma_phys,
411-
tqspi->dma_buf_size, DMA_TO_DEVICE);
412-
413410
/*
414411
* In packed mode, each word in FIFO may contain multiple packets
415412
* based on bits per word. So all bytes in each FIFO word are valid.
@@ -442,17 +439,11 @@ tegra_qspi_copy_client_txbuf_to_qspi_txbuf(struct tegra_qspi *tqspi, struct spi_
442439

443440
tqspi->cur_tx_pos += write_bytes;
444441
}
445-
446-
dma_sync_single_for_device(tqspi->dev, tqspi->tx_dma_phys,
447-
tqspi->dma_buf_size, DMA_TO_DEVICE);
448442
}
449443

450444
static void
451445
tegra_qspi_copy_qspi_rxbuf_to_client_rxbuf(struct tegra_qspi *tqspi, struct spi_transfer *t)
452446
{
453-
dma_sync_single_for_cpu(tqspi->dev, tqspi->rx_dma_phys,
454-
tqspi->dma_buf_size, DMA_FROM_DEVICE);
455-
456447
if (tqspi->is_packed) {
457448
tqspi->cur_rx_pos += tqspi->curr_dma_words * tqspi->bytes_per_word;
458449
} else {
@@ -478,9 +469,6 @@ tegra_qspi_copy_qspi_rxbuf_to_client_rxbuf(struct tegra_qspi *tqspi, struct spi_
478469

479470
tqspi->cur_rx_pos += read_bytes;
480471
}
481-
482-
dma_sync_single_for_device(tqspi->dev, tqspi->rx_dma_phys,
483-
tqspi->dma_buf_size, DMA_FROM_DEVICE);
484472
}
485473

486474
static void tegra_qspi_dma_complete(void *args)
@@ -701,8 +689,6 @@ static int tegra_qspi_start_dma_based_transfer(struct tegra_qspi *tqspi, struct
701689
return ret;
702690
}
703691

704-
dma_sync_single_for_device(tqspi->dev, tqspi->rx_dma_phys,
705-
tqspi->dma_buf_size, DMA_FROM_DEVICE);
706692
ret = tegra_qspi_start_rx_dma(tqspi, t, len);
707693
if (ret < 0) {
708694
dev_err(tqspi->dev, "failed to start RX DMA: %d\n", ret);

0 commit comments

Comments
 (0)