Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

u-boot-iot2050: Add a temporary workaround for the SD Card issue #567

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: Fri, 8 Nov 2024 10:23:52 +0800
Subject: [PATCH] driver: iot2050: Add a temporary workaround for the SD Card
issue

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

TODO: Implement a permanent solution for SD Card 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 dff0ff89a801..99a92f44bef4 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -651,8 +651,16 @@ static int sd_send_op_cond(struct mmc *mmc, bool uhs_en)
if (cmd.response[0] & OCR_BUSY)
break;

- if (timeout-- <= 0)
- return -EOPNOTSUPP;
+ /*
+ * TODO: Implement a permanent solution for the SD Card detection issues.
+ * After approximately 2 months of operation, the device may fail to
+ * detect the SD when rebooting. Here provides a temporary workaround
+ * to bypass the issue.
+ */
+ if (timeout-- <= 0) {
+ printf("mmc: SD Card is busy, continue booting\n");
+ break; //return -EOPNOTSUPP;
+ }

udelay(1000);
}
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 @@ -25,6 +25,7 @@ SRC_URI += " \
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 \
file://0014-driver-iot2050-Add-a-temporary-workaround-for-the-SD.patch \
"

SRC_URI[sha256sum] = "e00e6c6f014e046101739d08d06f328811cebcf5ae101348f409cbbd55ce6900"
Expand Down