summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-fsl-cpm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2024-03-29 01:32:34 +0000
committerMark Brown <broonie@kernel.org>2024-03-29 01:32:34 +0000
commit32e13575511117522002faaa043deb7cb7f5d7ea (patch)
tree1bf3ea9b8d1da39048aa0ffa5e9edd38f0bf1552 /drivers/spi/spi-fsl-cpm.c
parent09f347cdd451a9670ce43d6d1736a0b2065cb079 (diff)
parent64fe73d10323e399b2e8eb5407390bcb302a046c (diff)
spi: more tx_buf/rx_buf removal
Merge series from David Lechner <dlechner@baylibre.com>: I found a couple more controller drivers that were checking if the tx_buf and rx_buf fields in the spi_transfer structure were set by a peripheral driver that I missed in [1]. These checks can be removed as well. [1]: https://lore.kernel.org/linux-spi/20240325-spi-remove-is_dma_mapped-v2-1-d08d62b61f1c@baylibre.com/
Diffstat (limited to 'drivers/spi/spi-fsl-cpm.c')
-rw-r--r--drivers/spi/spi-fsl-cpm.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/spi/spi-fsl-cpm.c b/drivers/spi/spi-fsl-cpm.c
index 47c7a5c6257f..e335132080bf 100644
--- a/drivers/spi/spi-fsl-cpm.c
+++ b/drivers/spi/spi-fsl-cpm.c
@@ -98,19 +98,13 @@ static void fsl_spi_cpm_bufs_start(struct mpc8xxx_spi *mspi)
mpc8xxx_spi_write_reg(&reg_base->command, SPCOM_STR);
}
-int fsl_spi_cpm_bufs(struct mpc8xxx_spi *mspi,
- struct spi_transfer *t, bool is_dma_mapped)
+int fsl_spi_cpm_bufs(struct mpc8xxx_spi *mspi, struct spi_transfer *t)
{
struct device *dev = mspi->dev;
struct fsl_spi_reg __iomem *reg_base = mspi->reg_base;
- if (is_dma_mapped) {
- mspi->map_tx_dma = 0;
- mspi->map_rx_dma = 0;
- } else {
- mspi->map_tx_dma = 1;
- mspi->map_rx_dma = 1;
- }
+ mspi->map_tx_dma = 1;
+ mspi->map_rx_dma = 1;
if (!t->tx_buf) {
mspi->tx_dma = mspi->dma_dummy_tx;
@@ -147,7 +141,7 @@ int fsl_spi_cpm_bufs(struct mpc8xxx_spi *mspi,
return -ENOMEM;
}
} else if (t->tx_buf) {
- mspi->tx_dma = t->tx_dma;
+ mspi->tx_dma = 0;
}
if (mspi->map_rx_dma) {