build/patch/kernel/archive/sunxi-5.15/patches.megous/mmc-add-delay-after-power-class-selection.patch

39 lines
1.0 KiB
Diff

From f4739b16953473a51af17bdb1a6ad8240e996f9b Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Fri, 16 Mar 2018 20:31:55 +0100
Subject: [PATCH 142/478] mmc: add delay after power class selection
This seems to fix issue with sporadic ETIMEOUT in eMMC cache
initialization on second generation TBS A711 tablet.
Signed-off-by: Ondrej Jirman <megous@megous.com>
---
drivers/mmc/core/mmc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 29e58ffae379..82d58d9ecf17 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1798,6 +1798,8 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
*/
mmc_select_powerclass(card);
+ msleep(20);
+
/*
* Enable HPI feature (if supported)
*/
@@ -1816,6 +1818,8 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
}
}
+ msleep(20);
+
/*
* If cache size is higher than 0, this indicates the existence of cache
* and it can be turned on. Note that some eMMCs from Micron has been
--
2.35.3