diff options
author | Masahisa Kojima <masahisa.kojima@linaro.org> | 2021-02-01 01:31:09 -0600 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-02-03 16:23:07 +0000 |
commit | 1c9f1750f0305bf605ff22686fc0ac89c06deb28 (patch) | |
tree | acc07b7164fe61974839057b857879d349f715dd /drivers/spi/spi-synquacer.c | |
parent | 9d2aa6dbf87af89c13cac2d1b4cccad83fb14a7e (diff) |
spi: spi-synquacer: fix set_cs handling
When the slave chip select is deasserted, DMSTOP bit
must be set.
Fixes: b0823ee35cf9 ("spi: Add spi driver for Socionext SynQuacer platform")
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20210201073109.9036-1-jassisinghbrar@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-synquacer.c')
-rw-r--r-- | drivers/spi/spi-synquacer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/spi/spi-synquacer.c b/drivers/spi/spi-synquacer.c index 8cdca6ab8098..ea706d9629cb 100644 --- a/drivers/spi/spi-synquacer.c +++ b/drivers/spi/spi-synquacer.c @@ -490,6 +490,10 @@ static void synquacer_spi_set_cs(struct spi_device *spi, bool enable) val &= ~(SYNQUACER_HSSPI_DMPSEL_CS_MASK << SYNQUACER_HSSPI_DMPSEL_CS_SHIFT); val |= spi->chip_select << SYNQUACER_HSSPI_DMPSEL_CS_SHIFT; + + if (!enable) + val |= SYNQUACER_HSSPI_DMSTOP_STOP; + writel(val, sspi->regs + SYNQUACER_HSSPI_REG_DMSTART); } |