Patch "spi: spi-geni-qcom: Select FIFO mode for chip select" has been added to the 6.3-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: spi-geni-qcom: Select FIFO mode for chip select

to the 6.3-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-spi-geni-qcom-select-fifo-mode-for-chip-select.patch
and it can be found in the queue-6.3 subdirectory.

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



commit b24ab44566f304c8cfe3e277bb6d263b21fea5a7
Author: Vijaya Krishna Nivarthi <quic_vnivarth@xxxxxxxxxxx>
Date:   Tue May 9 15:31:36 2023 +0530

    spi: spi-geni-qcom: Select FIFO mode for chip select
    
    [ Upstream commit 4c329f5da7cfa366bacfda1328a025dd38951317 ]
    
    Spi geni driver switches between FIFO and DMA modes based on xfer length.
    FIFO mode relies on M_CMD_DONE_EN interrupt for completion while DMA mode
    relies on XX_DMA_DONE.
    During dynamic switching, if FIFO mode is chosen, FIFO related interrupts
    are enabled and DMA related interrupts are disabled. And viceversa.
    Chip select shares M_CMD_DONE_EN interrupt with FIFO to check completion.
    Now, if a chip select operation is preceded by a DMA xfer, M_CMD_DONE_EN
    interrupt would have been disabled and hence it will never receive one
    resulting in timeout.
    
    For chip select, in addition to setting the xfer mode to FIFO,
    select_mode() to FIFO so that required interrupts are enabled.
    
    Fixes: e5f0dfa78ac7 ("spi: spi-geni-qcom: Add support for SE DMA mode")
    Suggested-by: Praveen Talari <quic_ptalari@xxxxxxxxxxx
    Signed-off-by: Vijaya Krishna Nivarthi <quic_vnivarth@xxxxxxxxxxx
    Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx
    Link: https://lore.kernel.org/r/1683626496-9685-1-git-send-email-quic_vnivarth@xxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c
index babb039bcb431..b106faf21a723 100644
--- a/drivers/spi/spi-geni-qcom.c
+++ b/drivers/spi/spi-geni-qcom.c
@@ -294,6 +294,8 @@ static void spi_geni_set_cs(struct spi_device *slv, bool set_flag)
 	mas->cs_flag = set_flag;
 	/* set xfer_mode to FIFO to complete cs_done in isr */
 	mas->cur_xfer_mode = GENI_SE_FIFO;
+	geni_se_select_mode(se, mas->cur_xfer_mode);
+
 	reinit_completion(&mas->cs_done);
 	if (set_flag)
 		geni_se_setup_m_cmd(se, SPI_CS_ASSERT, 0);



[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