From: jassisinghbrar@gmail.com
To: linux-spi@vger.kernel.org
Cc: broonie@kernel.org, Masahisa Kojima <masahisa.kojima@linaro.org>,
Jassi Brar <jaswinder.singh@linaro.org>,
stable@vger.kernel.org
Subject: [PATCH] spi: spi-synquacer: fix set_cs handling
Date: Mon, 1 Feb 2021 01:31:09 -0600 [thread overview]
Message-ID: <20210201073109.9036-1-jassisinghbrar@gmail.com> (raw)
From: Masahisa Kojima <masahisa.kojima@linaro.org>
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
---
drivers/spi/spi-synquacer.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/spi/spi-synquacer.c b/drivers/spi/spi-synquacer.c
index 42e82dbe3d41..a3344f1cc8ff 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);
}
--
2.20.1
next reply other threads:[~2021-02-01 7:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-01 7:31 jassisinghbrar [this message]
2021-02-03 21:08 ` [PATCH] spi: spi-synquacer: fix set_cs handling Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210201073109.9036-1-jassisinghbrar@gmail.com \
--to=jassisinghbrar@gmail.com \
--cc=broonie@kernel.org \
--cc=jaswinder.singh@linaro.org \
--cc=linux-spi@vger.kernel.org \
--cc=masahisa.kojima@linaro.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).