From: Masahisa Kojima <masahisa.kojima@linaro.org>
To: u-boot@lists.denx.de
Cc: Jassi Brar <jaswinder.singh@linaro.org>,
Satoru Okamoto <okamoto.satoru@socionext.com>,
Masahisa Kojima <masahisa.kojima@linaro.org>,
Jagan Teki <jagan@amarulasolutions.com>
Subject: [PATCH 3/4] spi: synquacer: DMSTART bit must not be set while transferring
Date: Tue, 17 May 2022 17:41:38 +0900 [thread overview]
Message-ID: <20220517084139.6986-4-masahisa.kojima@linaro.org> (raw)
In-Reply-To: <20220517084139.6986-1-masahisa.kojima@linaro.org>
DMSTART bit must not be set while there is active transfer.
This commit sets the DMSTART bit only when the transfer begins.
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Signed-off-by: Satoru Okamoto <okamoto.satoru@socionext.com>
---
drivers/spi/spi-synquacer.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/spi/spi-synquacer.c b/drivers/spi/spi-synquacer.c
index f1422cf893..5e1b3aedc7 100644
--- a/drivers/spi/spi-synquacer.c
+++ b/drivers/spi/spi-synquacer.c
@@ -330,9 +330,11 @@ static int synquacer_spi_xfer(struct udevice *dev, unsigned int bitlen,
writel(~0, priv->base + RXC);
/* Trigger */
- val = readl(priv->base + DMSTART);
- val |= BIT(TRIGGER);
- writel(val, priv->base + DMSTART);
+ if (flags & SPI_XFER_BEGIN) {
+ val = readl(priv->base + DMSTART);
+ val |= BIT(TRIGGER);
+ writel(val, priv->base + DMSTART);
+ }
while (busy & (BIT(RXBIT) | BIT(TXBIT))) {
if (priv->rx_words)
--
2.17.1
next prev parent reply other threads:[~2022-05-17 8:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-17 8:41 [PATCH 0/4] spi-synquacer fixes and improvement Masahisa Kojima
2022-05-17 8:41 ` [PATCH 1/4] spi: synquacer: busy variable must be initialized before use Masahisa Kojima
2022-05-18 3:42 ` Jassi Brar
2022-06-10 21:40 ` Tom Rini
2022-05-17 8:41 ` [PATCH 2/4] spi: synquacer: wait until slave is deselected Masahisa Kojima
2022-05-18 3:42 ` Jassi Brar
2022-06-10 21:40 ` Tom Rini
2022-05-17 8:41 ` Masahisa Kojima [this message]
2022-05-18 3:43 ` [PATCH 3/4] spi: synquacer: DMSTART bit must not be set while transferring Jassi Brar
2022-06-10 21:40 ` Tom Rini
2022-05-17 8:41 ` [PATCH 4/4] spi: synquacer: simplify tx completion checking Masahisa Kojima
2022-05-18 3:43 ` Jassi Brar
2022-06-10 21:40 ` Tom Rini
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=20220517084139.6986-4-masahisa.kojima@linaro.org \
--to=masahisa.kojima@linaro.org \
--cc=jagan@amarulasolutions.com \
--cc=jaswinder.singh@linaro.org \
--cc=okamoto.satoru@socionext.com \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.