Commit 5df22576 authored by Masahisa Kojima's avatar Masahisa Kojima Committed by Greg Kroah-Hartman
Browse files

spi: spi-synquacer: fix set_cs handling

commit 1c9f1750 upstream.

When the slave chip select is deasserted, DMSTOP bit
must be set.

Fixes: b0823ee3

 ("spi: Add spi driver for Socionext SynQuacer platform")
Signed-off-by: default avatarMasahisa Kojima <masahisa.kojima@linaro.org>
Signed-off-by: default avatarJassi 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: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 351adebe
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment