linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: sxauwsk <sxauwsk@163.com>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	guojian <guojian@innoinstrument.net>,
	wangshikai <wangshikai@inno-instrument.cn>
Subject: Re: [PATCH] spi: cadence: Add usleep_range() for cdns_spi_fill_tx_fifo()
Date: Fri, 13 Apr 2018 19:03:05 +0100	[thread overview]
Message-ID: <20180413180304.GF6854@sirena.org.uk> (raw)
In-Reply-To: <1523272610-49116-1-git-send-email-sxauwsk@163.com>

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

On Mon, Apr 09, 2018 at 07:16:50PM +0800, sxauwsk wrote:
> In case of xspi work in busy condition, may send bytes failed.
> Add one bytes delay

>  	while ((trans_cnt < CDNS_SPI_FIFO_DEPTH) &&
>  	       (xspi->tx_bytes > 0)) {
> +
> +		/* When xspi in busy condition, bytes may send failed,
> +		 * caused communication failure so add one byte delay
> +		 */
> +		usleep_range(10, 20);
> +
>  		if (xspi->txbuf)
>  			cdns_spi_write(xspi, CDNS_SPI_TXD, *xspi->txbuf++);

This looks like it adds a byte of delay on every read/write - that
seems like a lot of overhead for something that sounds like it's
probably only an issue when the FIFO is full?  Do we need to do this for
every operation, and is it needed for read or is it just write?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-04-13 18:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-09 11:16 [PATCH] spi: cadence: Add usleep_range() for cdns_spi_fill_tx_fifo() sxauwsk
2018-04-13 18:03 ` Mark Brown [this message]
     [not found] <201804102112307962582@163.com>
2018-04-10 13:49 ` Mark Brown
2018-04-16 12:07 sxauwsk
2018-04-16 20:01 sxauwsk

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=20180413180304.GF6854@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=guojian@innoinstrument.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=sxauwsk@163.com \
    --cc=wangshikai@inno-instrument.cn \
    /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).