Skip to content

Commit

Permalink
u-boot-iot2050: Add temporary workaround for the QSPI issue
Browse files Browse the repository at this point in the history
After approximately 2 months of operation, the device may fail to check
the QSPI idle status. Here is the strange phenomenon: The QSPI remains
busy when checking the idle status, becoming idle once stop checking.
This commit provides a temporary workaround to bypass the QSPI idle
checking.

TODO: Implement a permanent solution for QSPI idle checking issue.

Related to #440.

Signed-off-by: Li Hua Qian <[email protected]>
  • Loading branch information
huaqianli committed Oct 22, 2024
1 parent 0b53652 commit 961fda1
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Li Hua Qian <[email protected]>
Date: Thu, 17 Oct 2024 11:31:38 +0800
Subject: [PATCH] qspi: iot2050: Add temporary workaround for the QSPI issue

After approximately 2 months of operation, the device may fail to check
the QSPI idle status. Here is the strange phenomenon: The QSPI remains
busy when checking the idle status, becoming idle once stop checking.
This commit provides a temporary workaround to bypass the QSPI idle
checking.

TODO: Implement a permanent solution for QSPI idle checking issue.

Signed-off-by: Li Hua Qian <[email protected]>
---
drivers/spi/cadence_qspi_apb.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/cadence_qspi_apb.c b/drivers/spi/cadence_qspi_apb.c
index 9ce2c0f254f3..2c32c4fc6b10 100644
--- a/drivers/spi/cadence_qspi_apb.c
+++ b/drivers/spi/cadence_qspi_apb.c
@@ -173,7 +173,20 @@ static unsigned int cadence_qspi_wait_idle(void *reg_base)
/* Timeout, still in busy mode. */
printf("QSPI: QSPI is still busy after poll for %d times.\n",
CQSPI_REG_RETRY);
- return 0;
+
+ /*
+ * TODO: Implement a permanent solution for QSPI idle checking issue.
+ * After approximately 2 months of operation, the device may fail to check
+ * the QSPI idle status. Here is the strange phenomenon: The QSPI remains
+ * busy when checking the idle status, becoming idle once stop checking.
+ * Providing a temporary workaround to bypass the QSPI idle checking.
+ */
+ if (CQSPI_REG_IS_IDLE(reg_base)) {
+ printf("QSPI: Idle state is %d, continue boot.\n",
+ CQSPI_REG_IS_IDLE(reg_base));
+ }
+
+ return 1;
}

void cadence_qspi_apb_readdata_capture(void *reg_base,
1 change: 1 addition & 0 deletions recipes-bsp/u-boot/u-boot-iot2050_2023.10.bb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ SRC_URI += " \
file://0009-dts-iot2050-Sync-kernel-dts-to-u-boot.patch \
file://0010-dts-iot2050-Support-new-IOT2050-SM-variant.patch \
file://0011-arm-dts-iot2050-Disable-lock-step-mode-for-all-iot20.patch \
file://0012-qspi-iot2050-Add-temporary-workaround-for-the-QSPI-i.patch \
"

SRC_URI[sha256sum] = "e00e6c6f014e046101739d08d06f328811cebcf5ae101348f409cbbd55ce6900"
Expand Down

0 comments on commit 961fda1

Please sign in to comment.