Skip to content

Commit f6b6256

Browse files
Jun Guobroonie
authored andcommitted
spi: spi-cadence: enable SPI_CONTROLLER_MUST_TX
During an SPI read operation, even if the xspi->txbuf passed to the cdns_spi_writerinterface is empty, it is still necessary to call cdns_spi_write(xspi, CDNS_SPI_TXD, txw); otherwise, the read operation will fail to obtain data correctly due to a lack of clocks. Fixes: 4e00135 ("spi: spi-cadence: supports transmission with bits_per_word of 16 and 32") Reported-by: Rodrigo Alencar <455.rodrigo.alencar@gmail.com> Closes: https://lore.kernel.org/all/lbijvnnwsnddonmm5pveqzap6iibxhl4maneq43x4j6w64dev6@u75qhm5cwiob/ Signed-off-by: Jun Guo <jun.guo@cixtech.com> Link: https://patch.msgid.link/20260115091924.844179-1-jun.guo@cixtech.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent b062a89 commit f6b6256

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/spi/spi-cadence.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,7 @@ static int cdns_spi_probe(struct platform_device *pdev)
729729
ctlr->unprepare_transfer_hardware = cdns_unprepare_transfer_hardware;
730730
ctlr->mode_bits = SPI_CPOL | SPI_CPHA;
731731
ctlr->bits_per_word_mask = SPI_BPW_MASK(8);
732+
ctlr->flags = SPI_CONTROLLER_MUST_TX;
732733

733734
if (of_device_is_compatible(pdev->dev.of_node, "cix,sky1-spi-r1p6"))
734735
ctlr->bits_per_word_mask |= SPI_BPW_MASK(16) | SPI_BPW_MASK(32);

0 commit comments

Comments
 (0)