diff options
author | David Lechner <dlechner@baylibre.com> | 2024-03-28 21:51:46 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-03-28 22:09:46 +0100 |
commit | 64fe73d10323e399b2e8eb5407390bcb302a046c (patch) | |
tree | bac422d2873fab4a301ba434a0d3ea007bd1a785 /drivers/spi/spi-fsl-cpm.c | |
parent | spi: au1550: t->{tx,rx}_dma checks (diff) | |
download | linux-64fe73d10323e399b2e8eb5407390bcb302a046c.tar.xz linux-64fe73d10323e399b2e8eb5407390bcb302a046c.zip |
spi: fsl: remove is_dma_mapped checks
There are no more peripheral drivers that set t->tx_dma or t->rx_dma.
Therefore, is_dma_mapped is always false and can be removed.
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://msgid.link/r/20240328-spi-more-tx-rx-buf-cleanup-v1-2-9ec1ceedf08c@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-fsl-cpm.c')
-rw-r--r-- | drivers/spi/spi-fsl-cpm.c | 14 |
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(®_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) { |