mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Kurz <akurz@blala.de>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 0/2] spi: imx: don't loop endlessly
Date: Fri, 29 Sep 2017 20:08:28 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.00.1709291955001.32464@blala.de> (raw)
In-Reply-To: <20170802193907.4317-1-u.kleine-koenig@pengutronix.de>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1211 bytes --]

Hi,
during xchg_single 32 bits will be sent and received:
2x32 bits / 10 Microseconds = 6.4MHz Clock.

Hence, a 10 Microseconds timeout will break SPI communication for
boards with SPI frequencies less then 6.4MHz.
On some boards spi-max-frequency is limited due to improper communication
at higher frequencies, e.g. for the kindle4 it is 1MHz and there 
also exists one board with 100kHz.

Before sending a patch calculating the timeout from spi-max-frequency,
is 640 Microseconds (to fit imx28-cfa10049.dts 100kHz) acceptable?

Regards, Alexander



On Wed, 2 Aug 2017, Uwe Kleine-König wrote:

> Hello,
> 
> during bringup of an i.MX7 board I am faced with cspi_2_3_xchg_single not
> returning. I don't know yet why this happens, but with this patch set it at least
> doesn't block barebox.
> 
> I didn't test on a working board, maybe the timeout (10 ?s) I chose is too tight?
> 
> Best regards
> Uwe
> 
> Uwe Kleine-K?nig (2):
>   spi: imx: add error checking
>   spi: imx: add timeout to xchg_single
> 
>  drivers/spi/imx_spi.c | 105 ++++++++++++++++++++++++++++++++++----------------
>  1 file changed, 72 insertions(+), 33 deletions(-)
> 
> -- 
> 2.11.0
> 
> 
> 

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2017-09-29 18:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-02 19:39 Uwe Kleine-König
2017-08-02 19:39 ` [PATCH 1/2] spi: imx: add error checking Uwe Kleine-König
2017-08-02 19:39 ` [PATCH 2/2] spi: imx: add timeout to xchg_single Uwe Kleine-König
2017-08-02 19:54 ` [PATCH 0/2] spi: imx: don't loop endlessly Sam Ravnborg
2017-08-02 20:19   ` Uwe Kleine-König
2017-08-02 20:32     ` Sam Ravnborg
2017-08-03  9:07       ` Uwe Kleine-König
2017-08-03 10:43         ` Sam Ravnborg
2017-08-03 18:41       ` Uwe Kleine-König
2017-09-29 18:08 ` Alexander Kurz [this message]
2017-10-02  5:31   ` Uwe Kleine-König

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=alpine.DEB.2.00.1709291955001.32464@blala.de \
    --to=akurz@blala.de \
    --cc=barebox@lists.infradead.org \
    --cc=u.kleine-koenig@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox