Re: [PATCH 0/2] spi: imx: don't loop endlessly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
> 
> 
> 
_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox

[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux