Skip to content

Commit d100058

Browse files
lumagbroonie
authored andcommitted
spi: spi-geni-qcom: enable SPI_CONTROLLER_MUST_TX for GPI DMA mode
The GPI DMA mode requires for TX DMA to be prepared. Force SPI core to provide TX buffer even if the caller didn't provide one by setting the SPI_CONTROLLER_MUST_TX flag. Fixes: b59c122 ("spi: spi-geni-qcom: Add support for GPI dma") Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent e884a13 commit d100058

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/spi/spi-geni-qcom.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,6 +1100,12 @@ static int spi_geni_probe(struct platform_device *pdev)
11001100
if (mas->cur_xfer_mode == GENI_SE_FIFO)
11011101
spi->set_cs = spi_geni_set_cs;
11021102

1103+
/*
1104+
* TX is required per GSI spec, see setup_gsi_xfer().
1105+
*/
1106+
if (mas->cur_xfer_mode == GENI_GPI_DMA)
1107+
spi->flags = SPI_CONTROLLER_MUST_TX;
1108+
11031109
ret = request_irq(mas->irq, geni_spi_isr, 0, dev_name(dev), spi);
11041110
if (ret)
11051111
goto spi_geni_release_dma;

0 commit comments

Comments
 (0)