[Patch v2] spi: nxp-fspi: Add 1us delay to make controller ready for next transaction

Kuldeep Singh kuldeep.singh at nxp.com
Tue Apr 21 08:27:47 CEST 2020

Board gets reset when performing burst read/write operations. On the
other hand, no such behaviour is observed on small size operations.

In Linux, readl_poll_timeout API already add delay of 1us which is
skipped in U-boot. Since, NXP Flexspi U-boot driver is a ported version
of Linux driver and U-boot poll_timeout API lacks delay functionality,
add 1us delay so as to make controller ready for other transactions.

Signed-off-by: Kuldeep Singh <kuldeep.singh at nxp.com>
v1: Add comments above udelay(1) change.

 drivers/spi/nxp_fspi.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/spi/nxp_fspi.c b/drivers/spi/nxp_fspi.c
index 0e6c7be..1c6538c 100644
--- a/drivers/spi/nxp_fspi.c
+++ b/drivers/spi/nxp_fspi.c
@@ -757,6 +757,13 @@ static int nxp_fspi_exec_op(struct spi_slave *slave,
 				   FSPI_STS0_ARB_IDLE, 1, POLL_TOUT, true);
+	/*
+	 * Watchdog gets triggered for large read/write/erase since this
+	 * delay is not present in this API(readl_poll_timeout), add
+	 * this delay here.
+	 */
+	udelay(1);
 	nxp_fspi_prepare_lut(f, op);
 	 * If we have large chunks of data, we read them through the AHB bus

More information about the U-Boot mailing list