[PATCH 0/2] spi: imx: don't loop endlessly
Alexander Kurz
akurz at blala.de
Fri Sep 29 11:08:28 PDT 2017
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
>
>
>
More information about the barebox
mailing list