From 9f5c778b6aaf5b02baa8c3e8c8ff9c1c9e738c15 Mon Sep 17 00:00:00 2001 From: Li Hua Qian Date: Mon, 4 Nov 2024 11:54:33 +0800 Subject: [PATCH] u-boot-iot2050: Add 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 if detection issues occur. TODO: Implement a permanent solution for eMMC detection issues. Related to #440. Signed-off-by: Li Hua Qian --- ...dd-temporary-workaround-for-the-eMMC.patch | 33 +++++++++++++++++++ recipes-bsp/u-boot/u-boot-iot2050_2023.10.bb | 1 + 2 files changed, 34 insertions(+) create mode 100644 recipes-bsp/u-boot/files/0013-driver-iot2050-Add-temporary-workaround-for-the-eMMC.patch diff --git a/recipes-bsp/u-boot/files/0013-driver-iot2050-Add-temporary-workaround-for-the-eMMC.patch b/recipes-bsp/u-boot/files/0013-driver-iot2050-Add-temporary-workaround-for-the-eMMC.patch new file mode 100644 index 000000000..bd30ebe78 --- /dev/null +++ b/recipes-bsp/u-boot/files/0013-driver-iot2050-Add-temporary-workaround-for-the-eMMC.patch @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Li Hua Qian +Date: Mon, 4 Nov 2024 10:46:14 +0800 +Subject: [PATCH] driver: iot2050: Add 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 if detection issues occur. + +TODO: Implement a permanent solution for eMMC detection issues. + +Signed-off-by: Li Hua Qian +--- + drivers/mmc/mmc.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c +index 31cfda288587..0afdbd9cd811 100644 +--- a/drivers/mmc/mmc.c ++++ b/drivers/mmc/mmc.c +@@ -729,8 +729,10 @@ static int mmc_send_op_cond(struct mmc *mmc) + if (mmc->ocr & OCR_BUSY) + break; + +- if (get_timer(start) > timeout) +- return -ETIMEDOUT; ++ if (get_timer(start) > timeout) { ++ printf("mmc: eMMC is busy, continue booting\n"); ++ break; //return -ETIMEDOUT; ++ } + udelay(100); + } + mmc->op_cond_pending = 1; diff --git a/recipes-bsp/u-boot/u-boot-iot2050_2023.10.bb b/recipes-bsp/u-boot/u-boot-iot2050_2023.10.bb index c5c00a465..ef0cbde91 100644 --- a/recipes-bsp/u-boot/u-boot-iot2050_2023.10.bb +++ b/recipes-bsp/u-boot/u-boot-iot2050_2023.10.bb @@ -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-temporary-workaround-for-the-eMMC.patch \ " SRC_URI[sha256sum] = "e00e6c6f014e046101739d08d06f328811cebcf5ae101348f409cbbd55ce6900"