mmc: core: Increase the timeout period of the ACMD41 command
authorFelix Qin <xiaokeqinhealth@126.com>
Mon, 29 Apr 2024 07:19:55 +0000 (15:19 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Fri, 3 May 2024 12:28:27 +0000 (14:28 +0200)
Extensive testing has shown that some specific SD cards require an
increased command timeout to be successfully initialized.

More info:
Platform: Rockchip SoC + DW Multimedia host Controller
SD card: Xvv microSD CMH34A17TMA12 (Made in Korea)
Note: The SD card is custom-made by the customer in collaboration
with the wafer foundry.

Signed-off-by: Felix Qin <xiaokeqinhealth@126.com>
Acked-by: Avri Altman <avri.altman@wdc.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Link: https://lore.kernel.org/r/20240429071955.163282-1-xiaokeqinhealth@126.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/sd_ops.c

index 9a777b0fea2706c7e1ed7567dbc92e668bbb5bcd..8b9b34286ef3e7851f612c5278617d6e5ab75ba4 100644 (file)
 #include "sd_ops.h"
 #include "mmc_ops.h"
 
+/*
+ * Extensive testing has shown that some specific SD cards
+ * require an increased command timeout to be successfully
+ * initialized.
+ */
 #define SD_APP_OP_COND_PERIOD_US       (10 * 1000) /* 10ms */
-#define SD_APP_OP_COND_TIMEOUT_MS      1000 /* 1s */
+#define SD_APP_OP_COND_TIMEOUT_MS      2000 /* 2s */
 
 struct sd_app_op_cond_busy_data {
        struct mmc_host *host;