[PATCH] spi: imx: make xchg_single timeout value compatible for older boards

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

 



A call of xchg_single will issue the transfer of 24 data bits with a given
maximum frequency. Since there exist some i.MX based boards with
spi-max-frequency = <100000>, change the xchg_single timeout to still
support those boards.

Fixes: 1439cdf7c6fc ("spi: imx: add timeout to xchg_single")
Signed-off-by: Alexander Kurz <akurz@xxxxxxxx>
---
 drivers/spi/imx_spi.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/imx_spi.c b/drivers/spi/imx_spi.c
index 7819879..0827de7 100644
--- a/drivers/spi/imx_spi.c
+++ b/drivers/spi/imx_spi.c
@@ -32,8 +32,11 @@
 #include <linux/err.h>
 #include <clock.h>
 
-/* time to wait for STAT_RR getting set */
-#define IMX_SPI_RR_TIMEOUT	10000 /* ns */
+/*
+ * time to wait for STAT_RR getting set, should allow the transfer
+ * of 24 bits at spi-max-frequency of 100kHz
+ */
+#define IMX_SPI_RR_TIMEOUT	250000 /* ns */
 
 struct imx_spi {
 	struct spi_master	master;
-- 
2.1.4


_______________________________________________
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