-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
u-boot-iot2050: Add a temporary workaround for the SD Card issue
We have not yet reproduced this issue on an SD card, but we have observed the QSPI issue on a basic device that only has an SD card. Therefore, it is highly likely that the issue could also occur on an SD card. As a precaution, we have included this workaround. 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. Related to #440. Signed-off-by: Li Hua Qian <[email protected]>
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
recipes-bsp/u-boot/files/0014-driver-iot2050-Add-a-temporary-workaround-for-the-SD.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 <[email protected]> | ||
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 <[email protected]> | ||
--- | ||
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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters