Skip to content

Commit

Permalink
u-boot-iot2050: Add a temporary workaround for the eMMC issue
Browse files Browse the repository at this point in the history
After approximately 2 months of operation, the device may fail to detect
the eMMC when rebooting. This commit provides a temporary workaround to
bypass the eMMC issue.

TODO: Implement a permanent solution for eMMC detection issues.

Related to #440.

Signed-off-by: Li Hua Qian <huaqian.li@siemens.com>
  • Loading branch information
huaqianli committed Nov 4, 2024
1 parent 75e2443 commit 6752962
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Li Hua Qian <huaqian.li@siemens.com>
Date: Mon, 4 Nov 2024 10:46:14 +0800
Subject: [PATCH] driver: iot2050: Add a temporary workaround for the eMMC
issue

After approximately 2 months of operation, the device may fail to detect
the eMMC when rebooting. This commit provides a temporary workaround to
bypass the eMMC issue.

TODO: Implement a permanent solution for eMMC detection issues.

Signed-off-by: Li Hua Qian <huaqian.li@siemens.com>
---
drivers/mmc/mmc.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 31cfda288587..dff0ff89a801 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -729,8 +729,16 @@ static int mmc_send_op_cond(struct mmc *mmc)
if (mmc->ocr & OCR_BUSY)
break;

- if (get_timer(start) > timeout)
- return -ETIMEDOUT;
+ /*
+ * TODO: Implement a permanent solution for the eMMC detection issues.
+ * After approximately 2 months of operation, the device may fail to
+ * detect the eMMC when rebooting. Here provides a temporary workaround
+ * to bypass the issue.
+ */
+ if (get_timer(start) > timeout) {
+ printf("mmc: eMMC is busy, continue booting\n");
+ break; //return -ETIMEDOUT;
+ }
udelay(100);
}
mmc->op_cond_pending = 1;
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 @@ -24,6 +24,7 @@ SRC_URI += " \
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 \
file://0013-driver-iot2050-Add-a-temporary-workaround-for-the-eMMC.patch \
"

SRC_URI[sha256sum] = "e00e6c6f014e046101739d08d06f328811cebcf5ae101348f409cbbd55ce6900"
Expand Down

0 comments on commit 6752962

Please sign in to comment.