linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Srinivas Goud <srinivas.goud@amd.com>
Cc: <broonie@kernel.org>, <linux-spi@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <git@amd.com>,
	<gcnu.goud@gmail.com>
Subject: Re: [PATCH v2 2/2] spi: spi-cadence: Add support for Slave mode
Date: Fri, 5 May 2023 16:28:54 +0000	[thread overview]
Message-ID: <20230505162854.GF68926@ediswmail.ad.cirrus.com> (raw)
In-Reply-To: <1681825625-10265-3-git-send-email-srinivas.goud@amd.com>

On Tue, Apr 18, 2023 at 07:17:05PM +0530, Srinivas Goud wrote:
> Currently SPI Cadence controller works only in Master mode.
> Updated interrupt handler for Full duplex transfer in Slave mode.
> Interrupt handler rely on the TX empty interrupt even for Slave mode
> transfer due to below HW limitation.
> 
> HW limitation:
> AR 65885 - SPI Controller Might Not Update RX_NEMPTY Flag, Showing
> Incorrect Status Of The Receive FIFO
> 
> SPI Slave mode works in the following manner:
> 1.      One transfer can be finished only after all transfer->len
> data been transferred to master device.
> 2.      Slave device only accepts transfer->len data. Any data longer
> than this from master device will be dropped. Any data shorter than
> this from master will cause SPI to be stuck due to the above behavior.
> 3.      The stale data present in RXFIFO will be dropped in unprepared
> hardware transfer function.
> 
> Signed-off-by: Srinivas Goud <srinivas.goud@amd.com>
> ---

This patch appears to cause longer SPI transactions to be
corrupted on my Zynq board. Still investigating but its not
immediately obvious to me what the problem is so any
suggestions/comments on how much longer transaction testing this
has had would be great. I am using the SPI in master mode and I
am not sure exactly what transaction size hits the problem yet.

Thanks,
Charles

  reply	other threads:[~2023-05-05 16:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18 13:47 [PATCH v2 0/2] spi: spi-cadence: Add Slave mode support Srinivas Goud
2023-04-18 13:47 ` [PATCH v2 1/2] spi: spi-cadence: Switch to spi_controller structure Srinivas Goud
2023-04-18 13:47 ` [PATCH v2 2/2] spi: spi-cadence: Add support for Slave mode Srinivas Goud
2023-05-05 16:28   ` Charles Keepax [this message]
2023-04-18 16:21 ` [PATCH v2 0/2] spi: spi-cadence: Add Slave mode support 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=20230505162854.GF68926@ediswmail.ad.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=broonie@kernel.org \
    --cc=gcnu.goud@gmail.com \
    --cc=git@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=srinivas.goud@amd.com \
    /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).