Patch "spi: tegra210-quad: Don't initialise DMA if not supported" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    spi: tegra210-quad: Don't initialise DMA if not supported

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     spi-tegra210-quad-don-t-initialise-dma-if-not-suppor.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit ec5a33a450319bcb3f9c4a9c2c1ee40637255ff6
Author: Jon Hunter <jonathanh@xxxxxxxxxx>
Date:   Wed Oct 26 16:56:33 2022 +0100

    spi: tegra210-quad: Don't initialise DMA if not supported
    
    [ Upstream commit ae4b3c1252f0fd0951d2f072a02ba46cac8d6c92 ]
    
    The following error messages are observed on boot for Tegra234 ...
    
     ERR KERN tegra-qspi 3270000.spi: cannot use DMA: -19
     ERR KERN tegra-qspi 3270000.spi: falling back to PIO
    
    Tegra234 does not support DMA for the QSPI and so initialising the DMA
    is expected to fail. The above error messages are misleading for devices
    that don't support DMA and so fix this by skipping the DMA
    initialisation for devices that don't support DMA.
    
    Signed-off-by: Jon Hunter <jonathanh@xxxxxxxxxx>
    Acked-by: Thierry Reding <treding@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221026155633.141792-1-jonathanh@xxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/spi/spi-tegra210-quad.c b/drivers/spi/spi-tegra210-quad.c
index 904972606bd4..10f0c5a6e0dc 100644
--- a/drivers/spi/spi-tegra210-quad.c
+++ b/drivers/spi/spi-tegra210-quad.c
@@ -720,6 +720,9 @@ static int tegra_qspi_start_cpu_based_transfer(struct tegra_qspi *qspi, struct s
 
 static void tegra_qspi_deinit_dma(struct tegra_qspi *tqspi)
 {
+	if (!tqspi->soc_data->has_dma)
+		return;
+
 	if (tqspi->tx_dma_buf) {
 		dma_free_coherent(tqspi->dev, tqspi->dma_buf_size,
 				  tqspi->tx_dma_buf, tqspi->tx_dma_phys);
@@ -750,6 +753,9 @@ static int tegra_qspi_init_dma(struct tegra_qspi *tqspi)
 	u32 *dma_buf;
 	int err;
 
+	if (!tqspi->soc_data->has_dma)
+		return 0;
+
 	dma_chan = dma_request_chan(tqspi->dev, "rx");
 	if (IS_ERR(dma_chan)) {
 		err = PTR_ERR(dma_chan);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux